mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 18:45:19 +00:00
ABI splits.
This commit is contained in:
parent
ce6d2d9c69
commit
b9b4dccff4
39
build.gradle
39
build.gradle
@ -326,6 +326,15 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resConfigs autoResConfig()
|
resConfigs autoResConfig()
|
||||||
|
|
||||||
|
splits {
|
||||||
|
abi {
|
||||||
|
enable true
|
||||||
|
reset()
|
||||||
|
include 'armeabi-v7a', 'x86', 'armeabi'
|
||||||
|
universalApk true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@ -455,31 +464,33 @@ def assembleWebsiteDescriptor = { variant, file ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
def signProductionRelease = { variant ->
|
def signProductionRelease = { variant ->
|
||||||
String apkName = variant.outputs[0].outputFile.name
|
variant.outputs.collect { output ->
|
||||||
File inputFile = new File(variant.outputs[0].outputFile.path);
|
String apkName = output.outputFile.name
|
||||||
File outputFile = new File(variant.outputs[0].outputFile.parent, apkName.replace("-unsigned", ""));
|
File inputFile = new File(output.outputFile.path)
|
||||||
|
File outputFile = new File(output.outputFile.parent, apkName.replace('-unsigned', ''))
|
||||||
|
|
||||||
new ApkSignerUtil("sun.security.pkcs11.SunPKCS11",
|
new ApkSignerUtil('sun.security.pkcs11.SunPKCS11',
|
||||||
"pkcs11.config",
|
'pkcs11.config',
|
||||||
"PKCS11",
|
'PKCS11',
|
||||||
"file:pkcs11.password").calculateSignature(inputFile.getAbsolutePath(),
|
'file:pkcs11.password').calculateSignature(inputFile.getAbsolutePath(),
|
||||||
outputFile.getAbsolutePath());
|
outputFile.getAbsolutePath())
|
||||||
|
|
||||||
inputFile.delete();
|
inputFile.delete()
|
||||||
return outputFile
|
outputFile
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task signProductionPlayRelease {
|
task signProductionPlayRelease {
|
||||||
doLast {
|
doLast {
|
||||||
signProductionRelease(android.applicationVariants.find({ it.name.equals("playRelease") }))
|
signProductionRelease(android.applicationVariants.find { (it.name == 'playRelease') })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task signProductionWebsiteRelease {
|
task signProductionWebsiteRelease {
|
||||||
doLast {
|
doLast {
|
||||||
def variant = android.applicationVariants.find({ it.name.equals("websiteRelease") })
|
def variant = android.applicationVariants.find { (it.name == 'websiteRelease') }
|
||||||
File signedRelease = signProductionRelease(variant)
|
File signedRelease = signProductionRelease(variant).find { it.name.contains('universal') }
|
||||||
assembleWebsiteDescriptor(variant, signedRelease);
|
assembleWebsiteDescriptor(variant, signedRelease)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user