diff options
author | 2018-07-25 18:08:35 -0700 | |
---|---|---|
committer | 2018-07-25 18:08:35 -0700 | |
commit | c884b6631f5d13637167f6bc66bbb81e6a00bd8f (patch) | |
tree | 91344f28ed707f8f39f294f329dddb4e964bf1ab | |
parent | e8d842b29fb7d80b062e9b51a27275e08b390108 (diff) | |
download | latinime-c884b6631f5d13637167f6bc66bbb81e6a00bd8f.tar.gz latinime-c884b6631f5d13637167f6bc66bbb81e6a00bd8f.tar.xz latinime-c884b6631f5d13637167f6bc66bbb81e6a00bd8f.zip |
Let Android Studio use 'shared' cert to build APK
make build uses 'shared' cert in build/make/target/product/security/.
If LatinIME APK built with AndroidStudio doesn't use the same signing
cert, then you cannot install the APK into AOSP image, which is not
convenient.
With this CL, AndroidStudio build also uses the same signing cert.
Note that shared.keystore was built as follows.
$ openssl pkcs8 -inform DER -nocrypt \
-in build/make/target/product/security/shared.pk8 \
-out shared.pem
$ openssl pkcs12 -export \
-in build/make/target/product/security/shared.x509.pem \
-inkey shared.pem -out shared.p12 \
-password pass:android -name AndroidDebugKey
$ keytool -importkeystore -deststorepass android \
-destkeystore shared.keystore -srckeystore shared.p12 \
-srcstoretype PKCS12 -srcstorepass android
Fix: 110741422
Test: made sure that the APK built with Android Studio can be
installed to an AOSP build
Change-Id: I471a87e190b15ff02bb06849e4660ed7898897a5
-rw-r--r-- | build.gradle | 8 | ||||
-rw-r--r-- | java/shared.keystore | bin | 0 -> 2926 bytes |
2 files changed, 8 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle index c36547256..ee5b7e6cd 100644 --- a/build.gradle +++ b/build.gradle @@ -32,6 +32,14 @@ android { testApplicationId 'com.android.inputmethod.latin.tests' testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = false + + signingConfig signingConfigs.debug + } + + signingConfigs { + debug { + storeFile file("java/shared.keystore") + } } buildTypes { diff --git a/java/shared.keystore b/java/shared.keystore Binary files differnew file mode 100644 index 000000000..9c2f1bdc2 --- /dev/null +++ b/java/shared.keystore |