Created
August 16, 2016 05:07
-
-
Save childnode/6df6d14c6b3aa47a327bb73ffd731444 to your computer and use it in GitHub Desktop.
idea gradle project setup for additional sourceSets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fixing setup of what idea does not automatically - see https://github.com/bmuschko/gradle-docker-plugin/blob/master/build.gradle | |
idea.project { | |
jdkName = '1.8' | |
languageLevel = compatibilityVersion | |
ipr.withXml { provider -> | |
def node = provider.asNode() | |
// Use GIT | |
def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' } | |
vcsConfig.mapping[0].'@vcs' = 'Git' | |
// Set Gradle home | |
def gradleSettings = node.appendNode('component', [name: 'GradleSettings']) | |
gradleSettings.appendNode('option', [name: 'SDK_HOME', value: gradle.gradleHomeDir]) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adds integrationTest sourceSet - see https://github.com/bmuschko/gradle-docker-plugin/blob/master/gradle/integration-test.gradle | |
idea.module { | |
sourceSets.integrationTest.allSource.srcDirs.each { | |
testSourceDirs += it | |
} | |
scopes.TEST.plus += [configurations.integrationTestCompile] | |
scopes.TEST.plus += [configurations.integrationTestRuntime] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see also https://gist.github.com/childnode/b8ae38d4962e3a77c3a2b233d63cf732 for additional sourceSets in gradle