Skip to content

Commit c073aec

Browse files
committed
Update gradle propperties for Android sample app
1 parent ab5046f commit c073aec

File tree

6 files changed

+28
-23
lines changed

6 files changed

+28
-23
lines changed

proj.android-studio/app/AndroidManifest.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3-
<!-- package="com.appsflyer.cocos2dX"-->
4-
<!-- android:installLocation="auto">-->
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:installLocation="auto">
54

65
<uses-feature android:glEsVersion="0x00020000" />
76

8-
package="com.example.yourapp">
9-
107
<application
118
android:label="@string/app_name"
129
android:allowBackup="true"
1310
android:icon="@mipmap/ic_launcher">
14-
11+
1512
<!-- Tell Cocos2dxActivity the name of our .so -->
1613
<meta-data android:name="android.app.lib_name"
17-
android:value="MyGame" />
14+
android:value="AppsFlyerCocos2dX" />
1815

1916
<service
2017
android:exported="true"

proj.android-studio/app/build.gradle

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import org.gradle.internal.os.OperatingSystem
33
apply plugin: 'com.android.application'
44

55
android {
6-
compileSdkVersion 33
6+
namespace 'com.appsflyer.cocos2dX'
7+
compileSdk 33
78

89
compileOptions {
910
sourceCompatibility JavaVersion.VERSION_17
1011
targetCompatibility JavaVersion.VERSION_17
1112
}
1213

1314
defaultConfig {
14-
namespace 'com.example.AppsFlyerCocos2dx'
1515
applicationId "com.appsflyer.cocos2dX"
1616
minSdkVersion PROP_MIN_SDK_VERSION
1717
targetSdkVersion PROP_TARGET_SDK_VERSION
@@ -21,7 +21,7 @@ android {
2121
externalNativeBuild {
2222
if (PROP_BUILD_TYPE == 'ndk-build') {
2323
ndkBuild {
24-
targets 'MyGame'
24+
targets 'AppsFlyerCocos2dX'
2525
arguments 'NDK_TOOLCHAIN_VERSION=clang'
2626
arguments '-j' + Runtime.runtime.availableProcessors()
2727

@@ -40,7 +40,7 @@ android {
4040
}
4141
else if (PROP_BUILD_TYPE == 'cmake') {
4242
cmake {
43-
targets 'MyGame'
43+
targets 'AppsFlyerCocos2dX'
4444
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE"
4545
cppFlags "-frtti -fexceptions -fsigned-char"
4646
}
@@ -115,6 +115,8 @@ android {
115115
}
116116
}
117117
}
118+
ndkVersion '27.0.12077973'
119+
buildToolsVersion '34.0.0'
118120
}
119121

120122
android.applicationVariants.all { variant ->
@@ -133,9 +135,11 @@ android.applicationVariants.all { variant ->
133135
dependencies {
134136
implementation fileTree(include: ['*.jar'], dir: 'libs')
135137
implementation project(':libcocos2dx')
136-
implementation 'com.appsflyer:af-android-sdk:6.15.1'
138+
implementation 'com.appsflyer:af-android-sdk:6.17.4'
137139
implementation 'com.android.installreferrer:installreferrer:2.1'
138-
implementation 'com.google.firebase:firebase-messaging:10.0.1'
140+
141+
implementation platform('com.google.firebase:firebase-bom:33.7.0')
142+
implementation 'com.google.firebase:firebase-messaging'
139143
}
140144

141-
apply plugin: 'com.google.gms.google-services' // ADD THIS LINE AT THE BOTTOM OF THIS FILE
145+
apply plugin: 'com.google.gms.google-services' // ADD THIS LINE AT THE BOTTOM OF THIS FILE

proj.android-studio/app/jni/Android.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ LOCAL_PATH := $(call my-dir)
22

33
include $(CLEAR_VARS)
44

5-
LOCAL_MODULE := MyGame
5+
LOCAL_MODULE := AppsFlyerCocos2dX
66

7-
LOCAL_MODULE_FILENAME := libMyGame
7+
LOCAL_MODULE_FILENAME := libAppsFlyerCocos2dX
88

99
LOCAL_SRC_FILES := $(LOCAL_PATH)/hellocpp/main.cpp \
1010
$(LOCAL_PATH)/../../../Classes/AppDelegate.cpp \

proj.android-studio/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.7.0'
9+
classpath 'com.android.tools.build:gradle:8.13.1'
1010
classpath 'com.google.gms:google-services:4.3.10' // ADD THIS LINE HERE
1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files

proj.android-studio/gradle.properties

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,33 @@
1818
# org.gradle.parallel=true
1919

2020
# Android SDK version that will be used as the compile project
21-
PROP_COMPILE_SDK_VERSION=30
21+
PROP_COMPILE_SDK_VERSION=33
2222

2323
# Android SDK version that will be used as the earliest version of android this application can run on
2424
PROP_MIN_SDK_VERSION=30
2525

2626
# Android SDK version that will be used as the latest version of android this application has been tested on
27-
PROP_TARGET_SDK_VERSION=30
27+
PROP_TARGET_SDK_VERSION=33
2828

2929

3030
# List of CPU Archtexture to build that application with
3131
# Available architextures (armeabi-v7a | arm64-v8a | x86)
3232
# To build for multiple architexture, use the `:` between them
3333
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
34-
PROP_APP_ABI=armeabi-v7a
34+
PROP_APP_ABI=arm64-v8a
3535

3636
# android native code build type
3737
# none, native code will never be compiled.
3838
# cmake, native code will be compiled by CMakeLists.txt
3939
# ndk-build, native code will be compiled by Android.mk
40-
PROP_BUILD_TYPE=ndk-build
40+
PROP_BUILD_TYPE=cmake
41+
42+
# AndroidX support
43+
android.useAndroidX=true
44+
android.enableJetifier=true
4145

4246
# uncomment it and fill in sign information for release mode
4347
#RELEASE_STORE_FILE=file path of keystore
4448
#RELEASE_STORE_PASSWORD=password of keystore
4549
#RELEASE_KEY_ALIAS=alias of key
46-
#RELEASE_KEY_PASSWORD=password of key
50+
#RELEASE_KEY_PASSWORD=password of key
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Wed Oct 09 17:38:59 EEST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)