Add signing support to gradle (via user.gradle configuratio file)

This commit is contained in:
mar-v-in 2015-01-02 20:54:29 +01:00
parent 342a828cf8
commit 75bd6cedd0
2 changed files with 15 additions and 8 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
gen
bin
build
user.gradle

View File

@ -22,16 +22,18 @@ dependencies {
tasks.findByPath(':preBuild').dependsOn += ':compatSetup'
task compatSetup (dependsOn: [':compat:assembleDebug',':compat:assembleRelease']) << {
task compatSetup(dependsOn: [':compat:assembleDebug', ':compat:assembleRelease']) << {
final java.util.concurrent.atomic.AtomicBoolean classpathSet = new java.util.concurrent.atomic.AtomicBoolean(false);
tasks.findAll{it.path.startsWith(':compile') && it.path.endsWith('Java')}.each{it.doFirst {
if (!classpathSet.get()) {
android.applicationVariants.all {
variant -> variant.javaCompile.classpath += project(':compat').files('build/intermediates/bundles/' + (variant.name.endsWith('ebug') ? 'debug' : 'release') + '/classes.jar');
};
classpathSet.set(true);
tasks.findAll { it.path.startsWith(':compile') && it.path.endsWith('Java') }.each {
it.doFirst {
if (!classpathSet.get()) {
android.applicationVariants.all {
variant -> variant.javaCompile.classpath += project(':compat').files('build/intermediates/bundles/' + (variant.name.endsWith('ebug') ? 'debug' : 'release') + '/classes.jar');
};
classpathSet.set(true);
}
}
}};
};
}
@ -61,3 +63,7 @@ android {
}
}
}
if (file('user.gradle').exists()) {
apply from: 'user.gradle'
}