Skip to content

Commit

Permalink
build: bump android ndk
Browse files Browse the repository at this point in the history
see: CleverRaven/Cataclysm-DDA#64305

Co-authored-by: Brett Dong <brett.browning.dong@gmail.com>
  • Loading branch information
scarf005 and BrettDong committed Sep 27, 2023
1 parent d7e3588 commit 914ba67
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/app/jni/SDL2_mixer
/app/jni/SDL2_ttf
/app/jni/libintl-lite
/app/jni/libhidapi
/app/jni/lua
/app/jni/mpg-123
/app/build
Expand Down
8 changes: 8 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ if (localProperties.getProperty('override_ndkBuildAppPlatform') != null) {
override_ndkBuildAppPlatform = localProperties.getProperty("override_ndkBuildAppPlatform")
}

def override_ndkVersion = getProperty("override_ndkVersion")
if (localProperties.getProperty('override_ndkVersion') != null) {
override_ndkVersion = localProperties.getProperty('override_ndkVersion')
}

println("Using [ njobs]: $njobs")
println("Using [ localize]: $localize")
println("Using [ deps]: $deps")
Expand All @@ -108,6 +113,7 @@ println("Using [ compileSdkVersion]: $override_compileSdkVersion")
println("Using [ minSdkVersion]: $override_minSdkVersion")
println("Using [ targetSdkVersion]: $override_targetSdkVersion")
println("Using [ndkBuildAppPlatform]: $override_ndkBuildAppPlatform")
println("Using [ ndkVersion]: $override_ndkVersion")
println("Using [ abi_arm_32]: $abi_arm_32")
println("Using [ abi_arm_64]: $abi_arm_64")
println("Using [ abi_x86_32]: $abi_x86_32")
Expand Down Expand Up @@ -164,7 +170,9 @@ unzipDeps.dependsOn makeLocalization
preBuild.dependsOn unzipDeps

android {
namespace "com.cleverraven.cataclysmdda"
compileSdkVersion override_compileSdkVersion
ndkVersion override_ndkVersion

if (override_version.isEmpty()) {
println("Generating version number to $version_header_path")
Expand Down
2 changes: 1 addition & 1 deletion android/app/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
APP_STL := c++_shared
APP_CPPFLAGS += -std=c++17
ifneq ($(OS),Windows_NT)
APP_LDFLAGS += -fuse-ld=gold
APP_LDFLAGS += -fuse-ld=lld
endif

# Do not specify APP_OPTIM here, it is done through ndk-build NDK_DEBUG=0/1 setting instead
Expand Down
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
com.gamemaker.game
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cleverraven.cataclysmdda"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:7.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,7 +15,7 @@ buildscript {

allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}
Expand Down
8 changes: 6 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@ override_compileSdkVersion=29

# This property controls which minSdkVersion should be used
# You can override this from the command line by passing "-Poverride_minSdkVersion=#"
override_minSdkVersion=14
override_minSdkVersion=21

# This property controls which targetSdkVersion should be used
# You can override this from the command line by passing "-Poverride_targetSdkVersion=#"
override_targetSdkVersion=29

# This property controls which ndkBuildAppPlatform should be used
# You can override this from the command line by passing "-Poverride_ndkBuildAppPlatform=#"
override_ndkBuildAppPlatform=android-16
override_ndkBuildAppPlatform=android-21

# This property controls which ndkVersion should be used
# You can override this from the command line by passing "-Poverride_ndkVersion=#"
override_ndkVersion=25.2.9519653
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip

0 comments on commit 914ba67

Please sign in to comment.