Skip to content

Commit

Permalink
Allow generated debug signed apk, and rename keystore props:
Browse files Browse the repository at this point in the history
- RELEASE_STORE_FILE ==> KEY_STORE_FILE
- KEY_STORE_PASSWORD ==> KEY_STORE_PASSWORD
- RELEASE_KEY_ALIAS ==> KEY_ALIAS
- RELEASE_KEY_PASSWORD ==> KEY_PASSWORD
  • Loading branch information
halx99 committed Jan 16, 2024
1 parent 32ef79a commit bef10d0
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 85 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@
- Improve cmake scripts for managing 3rd libs
- Add `Get TMXTilesetInfo` by name support by @lich426
- Include hpp and c files in CMakeLists.txt of cpp template by @@lich426
- Improve Gradle Scripts, onfig each build-variants for easy add custom build-variant, refer #1571
- Improve gradle scripts, config each build-variants for easy add custom build-variant, refer #1571
- Allow to override AX_USE_COMPAT_GL from user's `CMakeLists.txt` by @smilediver
- Allow generated debug signed apk, and rename keystore props:
- RELEASE_STORE_FILE ==> KEY_STORE_FILE
- KEY_STORE_PASSWORD ==> KEY_STORE_PASSWORD
- RELEASE_KEY_ALIAS ==> KEY_ALIAS
- RELEASE_KEY_PASSWORD ==> KEY_PASSWORD

### Break changes

Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ if (!$use_gradle) {
} else { # android gradle
# engine ci
if ($is_engine) {
$options.xc += "-PRELEASE_STORE_FILE=$AX_ROOT/tools/ci/axmol-ci.jks", '-PRELEASE_STORE_PASSWORD=axmol-ci', '-PRELEASE_KEY_ALIAS=axmol-ci', '-PRELEASE_KEY_PASSWORD=axmol-ci'
$options.xc += "-PKEY_STORE_FILE=$AX_ROOT/tools/ci/axmol-ci.jks", '-PKEY_STORE_PASSWORD=axmol-ci', '-PKEY_ALIAS=axmol-ci', '-PKEY_PASSWORD=axmol-ci'
}
}

Expand Down
20 changes: 11 additions & 9 deletions templates/cpp-template-default/proj.android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@ android {
}

signingConfigs {

release {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
common {
if (project.hasProperty("KEY_STORE_FILE")) {
storeFile file(KEY_STORE_FILE)
storePassword KEY_STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
Expand All @@ -69,15 +68,18 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}

debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions templates/cpp-template-default/proj.android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ PROP_TARGET_SDK_VERSION=34
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=arm64-v8a

# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore
#RELEASE_STORE_PASSWORD=password of keystore
#RELEASE_KEY_ALIAS=alias of key
#RELEASE_KEY_PASSWORD=password of key
# uncomment it and fill in sign information for generate signed apk
#KEY_STORE_FILE=file path of keystore
#KEY_STORE_PASSWORD=password of keystore
#KEY_ALIAS=alias of key
#KEY_PASSWORD=password of key

android.injected.testOnly=false
android.useAndroidX=true
Expand Down
19 changes: 11 additions & 8 deletions templates/lua-template-default/proj.android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ android {
}

signingConfigs {
release {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
common {
if (project.hasProperty("KEY_STORE_FILE")) {
storeFile file(KEY_STORE_FILE)
storePassword KEY_STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
Expand All @@ -68,15 +68,18 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}

debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions templates/lua-template-default/proj.android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ PROP_TARGET_SDK_VERSION=34
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=arm64-v8a

# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore
#RELEASE_STORE_PASSWORD=password of keystore
#RELEASE_KEY_ALIAS=alias of key
#RELEASE_KEY_PASSWORD=password of key
# uncomment it and fill in sign information for generate signed apk
#KEY_STORE_FILE=file path of keystore
#KEY_STORE_PASSWORD=password of keystore
#KEY_ALIAS=alias of key
#KEY_PASSWORD=password of key

android.injected.testOnly=false
android.useAndroidX=true
Expand Down
20 changes: 11 additions & 9 deletions tests/cpp-tests/proj.android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ android {
}

signingConfigs {

release {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
common {
if (project.hasProperty("KEY_STORE_FILE")) {
storeFile file(KEY_STORE_FILE)
storePassword KEY_STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
Expand All @@ -70,15 +69,18 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}

debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions tests/cpp-tests/proj.android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ PROP_TARGET_SDK_VERSION=34
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=arm64-v8a

# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore
#RELEASE_STORE_PASSWORD=password of keystore
#RELEASE_KEY_ALIAS=alias of key
#RELEASE_KEY_PASSWORD=password of key
# uncomment it and fill in sign information for generate signed apk
#KEY_STORE_FILE=file path of keystore
#KEY_STORE_PASSWORD=password of keystore
#KEY_ALIAS=alias of key
#KEY_PASSWORD=password of key

android.injected.testOnly=false
android.useAndroidX=true
Expand Down
20 changes: 11 additions & 9 deletions tests/fairygui-tests/proj.android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ android {
}

signingConfigs {

release {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
common {
if (project.hasProperty("KEY_STORE_FILE")) {
storeFile file(KEY_STORE_FILE)
storePassword KEY_STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
Expand All @@ -71,15 +70,18 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}

debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions tests/fairygui-tests/proj.android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ PROP_TARGET_SDK_VERSION=34
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=arm64-v8a

# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore
#RELEASE_STORE_PASSWORD=password of keystore
#RELEASE_KEY_ALIAS=alias of key
#RELEASE_KEY_PASSWORD=password of key
# uncomment it and fill in sign information for generate signed apk
# KEY_STORE_FILE=path/to/keystore.jks
# KEY_STORE_PASSWORD=axmol-ci
# KEY_ALIAS=axmol-ci
# KEY_PASSWORD=axmol-ci

android.injected.testOnly=false
android.useAndroidX=true
Expand Down
20 changes: 11 additions & 9 deletions tests/live2d-tests/proj.android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ android {
}

signingConfigs {

release {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
common {
if (project.hasProperty("KEY_STORE_FILE")) {
storeFile file(KEY_STORE_FILE)
storePassword KEY_STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
Expand All @@ -70,15 +69,18 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}

debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions tests/live2d-tests/proj.android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ PROP_TARGET_SDK_VERSION=34
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=arm64-v8a

# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore
#RELEASE_STORE_PASSWORD=password of keystore
#RELEASE_KEY_ALIAS=alias of key
#RELEASE_KEY_PASSWORD=password of key
# uncomment it and fill in sign information for generate signed apk
#KEY_STORE_FILE=file path of keystore
#KEY_STORE_PASSWORD=password of keystore
#KEY_ALIAS=alias of key
#KEY_PASSWORD=password of key

android.injected.testOnly=false
android.useAndroidX=true
Expand Down
20 changes: 11 additions & 9 deletions tests/lua-tests/proj.android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ android {
}

signingConfigs {

release {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
common {
if (project.hasProperty("KEY_STORE_FILE")) {
storeFile file(KEY_STORE_FILE)
storePassword KEY_STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
Expand All @@ -70,15 +69,18 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}

debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
if (project.hasProperty("KEY_STORE_FILE")) {
signingConfig signingConfigs.common
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions tests/lua-tests/proj.android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ PROP_TARGET_SDK_VERSION=34
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=arm64-v8a

# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore
#RELEASE_STORE_PASSWORD=password of keystore
#RELEASE_KEY_ALIAS=alias of key
#RELEASE_KEY_PASSWORD=password of key
# uncomment it and fill in sign information for generate signed apk
#KEY_STORE_FILE=file path of keystore
#KEY_STORE_PASSWORD=password of keystore
#KEY_ALIAS=alias of key
#KEY_PASSWORD=password of key

android.injected.testOnly=false
android.useAndroidX=true
Expand Down

0 comments on commit bef10d0

Please sign in to comment.