Skip to content

Commit cf3ec17

Browse files
committed
Lots of updates
This updates many of the examples to: - android-activity 0.6.1 - use Gradle 9, and AGP 9.1 - icon updates - Egui 0.33 (where applicable) - wgpu 0.29 (where applicable)
1 parent be04106 commit cf3ec17

112 files changed

Lines changed: 11522 additions & 6019 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

agdk-cpal/Cargo.lock

Lines changed: 658 additions & 344 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

agdk-cpal/Cargo.toml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
log = "0.4"
10-
android_logger = "0.11.0"
11-
android-activity = { version = "0.4", features = ["game-activity"] }
12-
cpal = "0.15"
9+
tracing = "0.1"
10+
tracing-subscriber = { version = "0.3", features = [
11+
"fmt",
12+
"env-filter",
13+
"tracing-log",
14+
] }
15+
paranoid-android = "0.2"
16+
tracing-log = "0.2"
17+
18+
android-activity = { version = "0.6", features = ["game-activity"] }
19+
ndk-sys = "0.6"
20+
ndk = "0.9"
21+
cpal = "0.17"
1322
atomic_float = "0.1"
1423
anyhow = "1"
1524

1625
[lib]
17-
name="main"
18-
crate_type=["cdylib"]
26+
name = "main"
27+
crate-type = ["cdylib"]

agdk-cpal/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export ANDROID_HOME="path/to/sdk"
99
rustup target add aarch64-linux-android
1010
cargo install cargo-ndk
1111
12-
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
12+
cargo ndk -t arm64-v8a -P 31 -o app/src/main/jniLibs/ build
1313
./gradlew build
1414
./gradlew installDebug
15-
adb shell am start -n co.realfit.agdkcpal/.MainActivity
15+
adb shell am start -n com.github.rust_mobile.agdkcpal/.MainActivity
1616
```

agdk-cpal/app/build.gradle

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,43 @@ plugins {
33
}
44

55
android {
6-
ndkVersion "25.2.9519653"
7-
compileSdk 31
6+
compileSdk = 35
87

98
defaultConfig {
10-
applicationId "co.realfit.agdkcpal"
11-
minSdk 28
12-
targetSdk 31
13-
versionCode 1
14-
versionName "1.0"
9+
applicationId = "com.github.rust_mobile.agdkcpal"
10+
minSdk = 31
11+
targetSdk = 35
12+
versionCode = 1
13+
versionName = "1.0"
1514

16-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1716
}
1817

1918
buildTypes {
2019
release {
21-
minifyEnabled false
20+
minifyEnabled = false
2221
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2322
}
2423
debug {
25-
minifyEnabled false
24+
minifyEnabled = false
2625
//packagingOptions {
2726
// doNotStrip '**/*.so'
2827
//}
2928
//debuggable true
3029
}
3130
}
3231
compileOptions {
33-
sourceCompatibility JavaVersion.VERSION_1_8
34-
targetCompatibility JavaVersion.VERSION_1_8
32+
sourceCompatibility = JavaVersion.VERSION_17
33+
targetCompatibility = JavaVersion.VERSION_17
3534
}
36-
namespace 'co.realfit.agdkcpal'
35+
namespace = 'com.github.rust_mobile.agdkcpal'
3736
}
3837

3938
dependencies {
40-
41-
implementation 'androidx.appcompat:appcompat:1.4.1'
42-
implementation 'com.google.android.material:material:1.5.0'
43-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
44-
testImplementation 'junit:junit:4.13.2'
45-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
46-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
47-
48-
// To use the Android Frame Pacing library
49-
//implementation "androidx.games:games-frame-pacing:1.9.1"
50-
51-
// To use the Android Performance Tuner
52-
//implementation "androidx.games:games-performance-tuner:1.5.0"
39+
implementation 'androidx.appcompat:appcompat:1.7.0'
5340

5441
// To use the Games Activity library
55-
implementation "androidx.games:games-activity:1.1.0"
56-
57-
// To use the Games Controller Library
58-
//implementation "androidx.games:games-controller:1.1.0"
59-
60-
// To use the Games Text Input Library
61-
//implementation "androidx.games:games-text-input:1.1.0"
42+
implementation "androidx.games:games-activity:4.4.0"
43+
// Note: don't include game-text-input separately, since it's integrated into game-activity
6244
}
6345

agdk-cpal/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
33

44
<application
5-
android:allowBackup="true"
65
android:icon="@mipmap/ic_launcher"
76
android:label="AGDK Cpal"
87
android:roundIcon="@mipmap/ic_launcher_round"
98
android:supportsRtl="true"
10-
android:theme="@style/Theme.RustTemplate">
9+
android:theme="@style/ActivityTheme">
1110
<activity
1211
android:name=".MainActivity"
1312
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"

agdk-cpal/app/src/main/java/co/realfit/agdkcpal/MainActivity.java renamed to agdk-cpal/app/src/main/java/com/github/rust_mobile/agdkcpal/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.realfit.agdkcpal;
1+
package com.github.rust_mobile.agdkcpal;
22

33
import androidx.appcompat.app.AppCompatActivity;
44
import androidx.core.view.WindowCompat;
@@ -28,7 +28,7 @@ public class MainActivity extends GameActivity {
2828

2929
// Load the native library.
3030
// The name "android-game" depends on your CMake configuration, must be
31-
// consistent here and inside AndroidManifect.xml
31+
// consistent here and inside AndroidManifest.xml
3232
System.loadLibrary("main");
3333
}
3434

agdk-cpal/app/src/main/res/drawable-v24/ic_launcher_foreground.xml

Lines changed: 0 additions & 30 deletions
This file was deleted.

agdk-cpal/app/src/main/res/drawable/ic_launcher_background.xml

Lines changed: 0 additions & 170 deletions
This file was deleted.

agdk-cpal/app/src/main/res/layout/activity_main.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
4-
<foreground android:drawable="@drawable/ic_launcher_foreground" />
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
55
</adaptive-icon>

0 commit comments

Comments
 (0)