Last active
August 29, 2015 14:04
-
-
Save johnrengelman/2436072a13419c3408ee to your computer and use it in GitHub Desktop.
Depending on Project Dependency Shadow Jar
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
// 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' | |
} |
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
// 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 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
//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