Jar with dependencies, closes #82
This commit is contained in:
@@ -3,7 +3,6 @@ apply plugin: 'com.github.dcendents.android-maven'
|
||||
|
||||
dependencies {
|
||||
compile project(':vtm-gdx')
|
||||
compile project(':vtm-themes')
|
||||
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
||||
compile 'com.caverock:androidsvg:1.2.2-beta-1'
|
||||
compile 'com.noveogroup.android:android-logger:1.3.6'
|
||||
@@ -66,6 +65,22 @@ android.applicationVariants.all { variant ->
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
def name = variant.buildType.name
|
||||
if (name.equals("debug")) {
|
||||
print "Skipping debug jar"
|
||||
return; // Skip debug builds.
|
||||
}
|
||||
def task = project.tasks.create "fatJar${name.capitalize()}", Jar
|
||||
task.classifier = 'jar-with-dependencies'
|
||||
task.dependsOn variant.javaCompile
|
||||
task.from variant.javaCompile.destinationDir
|
||||
task.from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
task.from("${rootProject.projectDir}/vtm-android/natives")
|
||||
task.from('natives')
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
configurations.archives.artifacts.removeAll { it.file =~ 'apk' }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user