2018.2: Unsupported Modules Detected

Answered

After I upgrade IDEA to 2018.2 from 2018.1.6, it shows "Unsupported Modules Detected: Compilation is not supported for following modules: main, test. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project."

 

But my project is a full spring boot project, I've never created android module.

 

How to fix it?

 

my project structure:

 

My build.gradle:

plugins {
id 'org.springframework.boot' version '2.0.3.RELEASE'
id "org.owasp.dependencycheck" version "3.2.1"
id "com.github.jk1.dependency-license-report" version "0.8"
id 'com.github.psxpaul.execfork' version '0.1.7'
}

apply plugin: 'java'
apply plugin: 'findbugs'
apply plugin: 'io.spring.dependency-management'

task wrapper(type: Wrapper) {
gradleVersion = '4.7'
}

repositories {
mavenCentral()
jcenter()
}

dependencies {
/**
* COMPILE DEPENDENCIES
*/
compile "org.projectlombok:lombok:1.16.18" // requires annotation processors to be enabled in IDE

compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-security")
compile("io.jsonwebtoken:jjwt:0.9.0")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-json')
compile("org.springframework.boot:spring-boot-starter-mail")
compile("org.springframework.boot:spring-boot-starter-thymeleaf")

// AWS related dependencies
compile 'com.amazonaws:aws-java-sdk-s3:1.11.363'
compile 'com.amazonaws:aws-java-sdk-sqs:1.11.363'

// data access to DB via JPA & Spring Data
compile 'org.postgresql:postgresql:42.2.2' // PostgreSQL driver
compile "org.flywaydb:flyway-core:5.0.7" // DB migrations

// Swagger 2 OpenAPI documentation
compile 'io.springfox:springfox-swagger2:2.8.0'
compile 'io.springfox:springfox-swagger-ui:2.8.0'

// utilities liabraries
compile("com.google.guava:guava:24.1-jre")
compile 'org.apache.commons:commons-text:1.4'

// Jersey REST client for integrations
compile 'org.glassfish.jersey.core:jersey-client:2.27'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-multipart', version: '2.27'

// compatibility
compile 'org.glassfish.jersey.inject:jersey-hk2:2.27'

// security upgrade for individual denpendencies which had vulnebilities

/**
* RUNTIME DEPENDENCIES
*/

// embedded Undertow web server for Spring Boot
runtime("org.springframework.boot:spring-boot-starter-undertow")

/**
* TEST DEPENDENCIES
*/
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("io.cucumber:cucumber-java:$cucumberVersion")
testCompile("io.cucumber:cucumber-junit:$cucumberVersion")
testCompile("org.junit.jupiter:junit-jupiter-api:5.2.0")
testCompile("org.junit.jupiter:junit-jupiter-engine:5.2.0")
// Bitbucket pipeline test result location
test {
reports.junitXml.destination = file('build/test-results/')
}
}

// Spring Boot
bootJar {
mainClassName = 'com.server.Application'
launchScript()
}

compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}

// code quality
findbugs {
effort = "max"
reportLevel = "medium"
includeFilter = file("$rootProject.projectDir/findBugsIncludeFilter.xml")
excludeFilter = file("$rootProject.projectDir/findBugsExcludeFilter.xml")
}

tasks.withType(FindBugs) {
reports {
xml.enabled false
html.enabled true
}
}

// OWASP dep check & license check
apply plugin: 'org.owasp.dependencycheck'
apply plugin: "com.github.jk1.dependency-license-report"

dependencyCheck {
// cve {
// url20Modified = 'https://nvd.nist.gov/feeds/xml/cve/2.0/nvdcve-2.0-modified.xml.gz'
// url20Base = 'https://nvd.nist.gov/feeds/xml/cve/2.0/nvdcve-2.0-%d.xml.gz'
// }
suppressionFile= "owasp-dependency-check-suppression.xml"
format = "ALL"
// fail if any vulneragbility with High Severity vulnerability appears
// based on CVSS (Common Vulnerabilit Scoring System)
// https://www.first.org/cvss/
// https://www.first.org/cvss/specification-document#5-Qualitative-Severity-Rating-Scale
failBuildOnCVSS = 6.9

}

licenseReport {
renderers = new com.github.jk1.license.render.InventoryHtmlReportRenderer('third-party-license-report.html')
}
1
10 comments

Hi. Could you please provide a project example?

0
Avatar
Permanently deleted user

Updated the project detail.

0

Does it help if you invalidate caches ("File | Invalidate cache") and reimport gradle project?

0
Avatar
Permanently deleted user

No, I even cloned a new jhipster gradle sample project to test. It also gets the warning.

0

Could you please provide a project sample, where the problem reproduce?

0
Avatar
Permanently deleted user
0

Hi. It runs fine for me, does it help if you remove .idea and reimport from the gradle model?

2
Avatar
Permanently deleted user

Thanks, it works after I deleted .idea, but I have to re-configure my settings.

0
Avatar
Permanently deleted user

Hi... I keep getting this error too even tho my apps still run on the emulator and my phone, where do I find the .idea to delete it???

0

.idea folder is located inside your project root.

0

Please sign in to leave a comment.