Created
July 31, 2014 15:33
-
-
Save johnrengelman/b406073eb3f088ce5d0c to your computer and use it in GitHub Desktop.
Kyro Shadow integration
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
apply plugin: 'java' | |
apply plugin: 'com.github.johnrengelman.shadow' | |
configurations { | |
reflectasmshade | |
} | |
dependencies { | |
// Dependency on a non-shaded version | |
compile group: 'com.esotericsoftware', name: 'reflectasm', version:'1.10.0' | |
//...all your other dependencies in the 'shadow' configuration...that will they will be on the POM. | |
//shadow group:'..', name: '...', version:'...' | |
//putting this in a separate configuration so we can add it to the shadowJar but not compile against it | |
reflectasmshade group: 'com.esotericsoftware', name: 'reflectasm', version:'1.10.0', classifier: 'shaded' | |
} | |
//Use the shadow configuration to compile the main sourceSet | |
sourceSets.main.compileClassPath += configurations.shadow | |
shadowJar { | |
from configurations.reflectasmshade | |
dependencies { | |
//exclude the non-shaded jar | |
exclude(dependency('com.esotericsoftware:reflectasm:1.10.0')) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment