Skip to content

Instantly share code, notes, and snippets.

@kknd22
Last active August 29, 2015 14:03
Show Gist options
  • Save kknd22/c664b901029f120e830d to your computer and use it in GitHub Desktop.
Save kknd22/c664b901029f120e830d to your computer and use it in GitHub Desktop.
build-cust-artifact-dependency.gradle
/**
* 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