Last active
August 29, 2015 14:03
-
-
Save kknd22/c664b901029f120e830d to your computer and use it in GitHub Desktop.
build-cust-artifact-dependency.gradle
This file contains 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
/** | |
* http://stackoverflow.com/questions/17875576/gradle-projects-depending-on-artifacts-created-by-sibling-projects | |
*/ | |
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile 'org.slf4j:slf4j-api:1.7.5' | |
compile 'org.springframework:spring-core:4.0.3.RELEASE' | |
testCompile "junit:junit:4.11" | |
compile project(path: ':sub', configuration: 'custC') | |
} | |
//----------------sub/build.gradle------------------------- | |
apply plugin: 'base' | |
configurations { | |
custC | |
} | |
task custT( type : Jar) { | |
from 'dir' | |
baseName 'me-sub' | |
} | |
artifacts { | |
custC custT | |
} | |
/* | |
artifacts { | |
archives custT | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment