Skip to content

Instantly share code, notes, and snippets.

@johnrengelman
Created July 31, 2014 15:33
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/b406073eb3f088ce5d0c to your computer and use it in GitHub Desktop.
Save johnrengelman/b406073eb3f088ce5d0c to your computer and use it in GitHub Desktop.
Kyro Shadow integration
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