vtm-android-gdx: add as dependency module and in deployment, #46, #44

This commit is contained in:
Emux 2016-07-04 15:12:56 +03:00
parent 234bd625e9
commit b3217ae2c0

View File

@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'com.github.dcendents.android-maven'
dependencies {
compile project(':vtm-gdx')
@ -41,6 +42,18 @@ android {
lintOptions { abortOnError false }
}
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 "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
artifacts.add('archives', task);
}
task run(dependsOn: 'installDebug') {
doFirst {
println(">> adb run...")
@ -52,3 +65,10 @@ task run(dependsOn: 'installDebug') {
proc.waitFor()
}
}
// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
}