Skip to content

Instantly share code, notes, and snippets.

@johnrengelman
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnrengelman/2436072a13419c3408ee to your computer and use it in GitHub Desktop.
Save johnrengelman/2436072a13419c3408ee to your computer and use it in GitHub Desktop.
Depending on Project Dependency Shadow Jar
// Client subproject build file - client/build.gradle
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
repositories {
jcenter()
}
dependencies {
compile 'junit:junit:3.8.2'
}
shadowJar {
relocate 'junit.framework', 'client.junit.framework'
}
// Server subproject build file - server/build.gradle
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
repositories {
jcenter()
}
dependencies {
// add compile & runtime dependencies
compile project(path: ':client', configuration: 'shadow')
}
//This file would be in the :server subproject - server/src/main/groovy/server/ServerTest.groovy
package server
imort client.junit.framework.Test
interface ServerTest extends Test {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment