Add signing support to gradle (via user.gradle configuratio file)
This commit is contained in:
parent
342a828cf8
commit
75bd6cedd0
|
@ -2,3 +2,4 @@
|
||||||
gen
|
gen
|
||||||
bin
|
bin
|
||||||
build
|
build
|
||||||
|
user.gradle
|
||||||
|
|
22
build.gradle
22
build.gradle
|
@ -22,16 +22,18 @@ dependencies {
|
||||||
|
|
||||||
tasks.findByPath(':preBuild').dependsOn += ':compatSetup'
|
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);
|
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 {
|
tasks.findAll { it.path.startsWith(':compile') && it.path.endsWith('Java') }.each {
|
||||||
if (!classpathSet.get()) {
|
it.doFirst {
|
||||||
android.applicationVariants.all {
|
if (!classpathSet.get()) {
|
||||||
variant -> variant.javaCompile.classpath += project(':compat').files('build/intermediates/bundles/' + (variant.name.endsWith('ebug') ? 'debug' : 'release') + '/classes.jar');
|
android.applicationVariants.all {
|
||||||
};
|
variant -> variant.javaCompile.classpath += project(':compat').files('build/intermediates/bundles/' + (variant.name.endsWith('ebug') ? 'debug' : 'release') + '/classes.jar');
|
||||||
classpathSet.set(true);
|
};
|
||||||
|
classpathSet.set(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,3 +63,7 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file('user.gradle').exists()) {
|
||||||
|
apply from: 'user.gradle'
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue