Fix duplicate content root problems in IntelliJ

This commit is contained in:
Matthew Nesbit
2017-04-25 16:14:48 +01:00
committed by Mike Hearn
parent 922a760a09
commit 7e3b9a8934
22 changed files with 18 additions and 201 deletions

View File

@ -95,6 +95,16 @@ allprojects {
sourceCompatibility = 1.8 sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
// Use manual resource copying of log4j2.xml rather than source sets.
// This prevents problems in IntelliJ with regard to duplicate source roots.
processResources {
from file("$rootDir/config/dev/log4j2.xml")
}
processTestResources {
from file("$rootDir/config/test/log4j2.xml")
}
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Xlint:-options" options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Xlint:-options"
} }

View File

@ -21,11 +21,6 @@ sourceSets {
srcDir file('src/integration-test/kotlin') srcDir file('src/integration-test/kotlin')
} }
} }
test {
resources {
srcDir "../../config/test"
}
}
} }
// To find potential version conflicts, run "gradle htmlDependencyReport" and then look in // To find potential version conflicts, run "gradle htmlDependencyReport" and then look in

View File

@ -10,14 +10,6 @@ configurations {
runtime.exclude module: 'isolated' runtime.exclude module: 'isolated'
} }
sourceSets {
test {
resources {
srcDir "../../config/test"
}
}
}
// To find potential version conflicts, run "gradle htmlDependencyReport" and then look in // To find potential version conflicts, run "gradle htmlDependencyReport" and then look in
// build/reports/project/dependencies/index.html for green highlighted parts of the tree. // build/reports/project/dependencies/index.html for green highlighted parts of the tree.

View File

@ -21,11 +21,6 @@ sourceSets {
srcDir file('src/integration-test/kotlin') srcDir file('src/integration-test/kotlin')
} }
} }
test {
resources {
srcDir "../../config/test"
}
}
} }
// To find potential version conflicts, run "gradle htmlDependencyReport" and then look in // To find potential version conflicts, run "gradle htmlDependencyReport" and then look in

View File

@ -10,14 +10,6 @@ buildscript {
} }
} }
sourceSets {
test {
resources {
srcDir "../config/test"
}
}
}
dependencies { dependencies {
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"

View File

@ -21,12 +21,6 @@ configurations {
} }
sourceSets { sourceSets {
main {
resources {
srcDir "../../../config/dev"
}
}
integrationTest { integrationTest {
kotlin { kotlin {
compileClasspath += main.output + test.output compileClasspath += main.output + test.output

View File

@ -22,14 +22,6 @@ dependencies {
testCompile "com.pholser:junit-quickcheck-generators:$quickcheck_version" testCompile "com.pholser:junit-quickcheck-generators:$quickcheck_version"
} }
sourceSets {
test {
resources {
srcDir "../config/test"
}
}
}
configurations.testCompile { configurations.testCompile {
// Excluding javassist:javassist because it clashes with Hibernate's // Excluding javassist:javassist because it clashes with Hibernate's
// transitive org.javassist:javassist dependency. // transitive org.javassist:javassist dependency.

View File

@ -4,11 +4,3 @@ apply plugin: CanonicalizerPlugin
dependencies { dependencies {
compile project(':core') compile project(':core')
} }
sourceSets {
test {
resources {
srcDir "../../config/test"
}
}
}

View File

@ -10,19 +10,6 @@ buildscript {
} }
} }
sourceSets {
test {
resources {
srcDir "../config/test"
}
}
main {
resources {
srcDir "../config/dev"
}
}
}
dependencies { dependencies {
compile project(":core") compile project(":core")

View File

@ -38,16 +38,6 @@ sourceSets {
srcDir file('src/integration-test/resources') srcDir file('src/integration-test/resources')
} }
} }
test {
resources {
srcDir "../config/test"
}
}
main {
resources {
srcDir "../config/dev"
}
}
} }
// To find potential version conflicts, run "gradle htmlDependencyReport" and then look in // To find potential version conflicts, run "gradle htmlDependencyReport" and then look in

View File

@ -19,19 +19,6 @@ configurations {
sourceCompatibility = 1.6 sourceCompatibility = 1.6
targetCompatibility = 1.6 targetCompatibility = 1.6
sourceSets {
test {
resources {
srcDir "../../config/test"
}
}
main {
resources {
srcDir "../../config/dev"
}
}
}
dependencies { dependencies {
compile project(':node') compile project(':node')
} }

View File

@ -7,16 +7,6 @@ apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
sourceSets { sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
test {
resources {
srcDir "../../config/test"
}
}
integrationTest { integrationTest {
kotlin { kotlin {
compileClasspath += main.output + test.output compileClasspath += main.output + test.output

View File

@ -7,16 +7,6 @@ apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
sourceSets { sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
test {
resources {
srcDir "../../config/test"
}
}
integrationTest { integrationTest {
kotlin { kotlin {
compileClasspath += main.output + test.output compileClasspath += main.output + test.output

View File

@ -10,16 +10,6 @@ apply plugin: 'application'
mainClassName = 'net.corda.irs.IRSDemo' mainClassName = 'net.corda.irs.IRSDemo'
sourceSets { sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
test {
resources {
srcDir "../../config/test"
}
}
integrationTest { integrationTest {
kotlin { kotlin {
compileClasspath += main.output + test.output compileClasspath += main.output + test.output

View File

@ -13,19 +13,6 @@ ext {
advertisedNotary = "$notaryType|$notaryName" advertisedNotary = "$notaryType|$notaryName"
} }
sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
test {
resources {
srcDir "../../config/test"
}
}
}
configurations { configurations {
integrationTestCompile.extendsFrom testCompile integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime integrationTestRuntime.extendsFrom testRuntime

View File

@ -11,16 +11,6 @@ apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
sourceSets { sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
test {
resources {
srcDir "../../config/test"
}
}
integrationTest { integrationTest {
kotlin { kotlin {
compileClasspath += main.output + test.output compileClasspath += main.output + test.output

View File

@ -7,16 +7,6 @@ apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
sourceSets { sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
test {
resources {
srcDir "../../config/test"
}
}
integrationTest { integrationTest {
kotlin { kotlin {
compileClasspath += main.output + test.output compileClasspath += main.output + test.output

View File

@ -12,19 +12,6 @@ apply plugin: 'application'
sourceCompatibility = 1.8 sourceCompatibility = 1.8
mainClassName = 'net.corda.explorer.Main' mainClassName = 'net.corda.explorer.Main'
sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
test {
resources {
srcDir "../../config/test"
}
}
}
dependencies { dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"

View File

@ -1,14 +1,6 @@
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'application' apply plugin: 'application'
sourceSets {
main {
resources {
srcDir "../../config/dev"
}
}
}
mainClassName = 'net.corda.loadtest.MainKt' mainClassName = 'net.corda.loadtest.MainKt'
dependencies { dependencies {

View File

@ -18,16 +18,6 @@ sourceSets {
srcDir file('src/integration-test/kotlin') srcDir file('src/integration-test/kotlin')
} }
} }
test {
resources {
srcDir "../config/test"
}
}
main {
resources {
srcDir "../config/dev"
}
}
} }
dependencies { dependencies {

View File

@ -17,16 +17,14 @@ sourceSets {
srcDir file('src/integration-test/kotlin') srcDir file('src/integration-test/kotlin')
} }
} }
test { }
resources {
srcDir "$rootDir/config/test" processResources {
} from file("$rootDir/config/dev/jolokia-access.xml")
} }
main {
resources { processTestResources {
srcDir "$rootDir/config/dev" from file("$rootDir/config/test/jolokia-access.xml")
}
}
} }
dependencies { dependencies {

View File

@ -19,19 +19,6 @@ configurations {
sourceCompatibility = 1.6 sourceCompatibility = 1.6
targetCompatibility = 1.6 targetCompatibility = 1.6
sourceSets {
test {
resources {
srcDir "$rootDir/config/test"
}
}
main {
resources {
srcDir "$rootDir/config/dev"
}
}
}
dependencies { dependencies {
compile project(':webserver') compile project(':webserver')
} }