Prevent source jars from being included in the gradle 'default' configuration and thus being included as dependencies in war files etc.

This commit is contained in:
Luke Taylor 2010-07-06 23:56:31 +01:00
parent 443ac0487a
commit d704a3bb4a
1 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,12 @@ artifacts {
archives sourceJar archives sourceJar
} }
// Remove the archive configuration from the runtime configuration, so that anything added to archives
// (such as the source jar) is no longer included in the runtime classpath
configurations.default.extendsFrom = [configurations.runtime] as Set
// Add the main jar into the default configuration
artifacts { 'default' jar }
dependencies { dependencies {
deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE" deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
} }