Skip to content

Commit 5be07e2

Browse files
authored
Merge pull request #601 from immutable/chore/unity6-android
chore: unity 6 sample android app, update unity 6 version in github actions
2 parents 431fe64 + fc296f3 commit 5be07e2

20 files changed

+1092
-26
lines changed

.github/workflows/test-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
6161
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
6262
with:
63-
unityVersion: 6000.0.58f1
63+
unityVersion: 6000.0.58f2
6464
projectPath: './sample-unity6'
6565
githubToken: ${{ secrets.GITHUB_TOKEN }}
6666
testMode: 'EditMode'
@@ -131,6 +131,7 @@ jobs:
131131
matrix:
132132
targetPlatform:
133133
- iOS
134+
- Android
134135
steps:
135136
- uses: actions/checkout@v4
136137
with:
@@ -150,7 +151,7 @@ jobs:
150151
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
151152
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
152153
with:
153-
unityVersion: 6000.0.58f1
154+
unityVersion: 6000.0.58f2
154155
targetPlatform: ${{ matrix.targetPlatform }}
155156
projectPath: sample-unity6
156157
- uses: actions/upload-artifact@v4

.github/workflows/ui-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
export TMPDIR="/Users/svc_buildsdk/tmp"
111111
mkdir -p "$TMPDIR"
112112
mkdir -p sample-unity6/Tests
113-
/Applications/Unity/Hub/Editor/6000.0.58f1/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/first-build-log.txt" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS" || true
113+
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/first-build-log.txt" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS" || true
114114
115115
echo "First build completed (may have failed, that's ok). Checking for AltTester..."
116116
if ls -la "${{ github.workspace }}/sample-unity6/Library/PackageCache/" | grep alttester; then
@@ -124,7 +124,7 @@ jobs:
124124
export TMPDIR="/Users/svc_buildsdk/tmp"
125125
mkdir -p "$TMPDIR"
126126
mkdir -p sample-unity6/Tests
127-
/Applications/Unity/Hub/Editor/6000.0.58f1/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/build-log.log" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS"
127+
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/build-log.log" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS"
128128
129129
echo "Build completed. Checking for build output..."
130130
ls -la sample-unity6/Tests/

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
# Gradle cache directory
3333
.gradle/
3434

35+
# Unity Android temporary build files
36+
.utmp/
37+
3538
# Autogenerated VS/MD/Consulo solution and project files
3639
ExportedObj/
3740
.consulo/

sample-unity6/Assets/Plugins.meta

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

sample-unity6/Assets/Plugins/Android.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools">
5+
<application>
6+
<activity android:name="com.unity3d.player.UnityPlayerActivity"
7+
android:theme="@style/UnityThemeSelector">
8+
<intent-filter>
9+
<action android:name="android.intent.action.MAIN" />
10+
<category android:name="android.intent.category.LAUNCHER" />
11+
</intent-filter>
12+
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
13+
</activity>
14+
<activity
15+
android:name="com.immutable.unity.RedirectActivity"
16+
android:exported="true" >
17+
<intent-filter android:autoVerify="true">
18+
<action android:name="android.intent.action.VIEW" />
19+
<category android:name="android.intent.category.DEFAULT" />
20+
<category android:name="android.intent.category.BROWSABLE" />
21+
<data android:host="callback" android:scheme="immutablerunner" />
22+
<data android:host="logout" android:scheme="immutablerunner" />
23+
</intent-filter>
24+
</activity>
25+
</application>
26+
</manifest>

sample-unity6/Assets/Plugins/Android/AndroidManifest.xml.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
apply plugin: 'com.android.library'
2+
apply from: '../shared/keepUnitySymbols.gradle'
3+
**APPLY_PLUGINS**
4+
5+
dependencies {
6+
implementation fileTree(dir: 'libs', include: ['*.jar'])
7+
implementation('androidx.browser:browser:1.5.0')
8+
**DEPS**}
9+
10+
android {
11+
namespace "com.unity3d.player"
12+
ndkPath "**NDKPATH**"
13+
ndkVersion "**NDKVERSION**"
14+
15+
compileSdk **APIVERSION**
16+
buildToolsVersion = "**BUILDTOOLS**"
17+
18+
compileOptions {
19+
sourceCompatibility JavaVersion.VERSION_17
20+
targetCompatibility JavaVersion.VERSION_17
21+
}
22+
23+
defaultConfig {
24+
minSdk **MINSDK**
25+
targetSdk **TARGETSDK**
26+
ndk {
27+
abiFilters **ABIFILTERS**
28+
debugSymbolLevel **DEBUGSYMBOLLEVEL**
29+
}
30+
versionCode **VERSIONCODE**
31+
versionName '**VERSIONNAME**'
32+
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
33+
**DEFAULT_CONFIG_SETUP**
34+
}
35+
36+
lint {
37+
abortOnError false
38+
}
39+
40+
androidResources {
41+
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
42+
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
43+
}**PACKAGING**
44+
}
45+
**IL_CPP_BUILD_SETUP**
46+
**SOURCE_BUILD_SETUP**
47+
**EXTERNAL_SOURCES**

sample-unity6/Assets/Plugins/Android/mainTemplate.gradle.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-dontwarn com.immutable.**
2+
-keep class com.immutable.** { *; }
3+
-keep interface com.immutable.** { *; }
4+
5+
-dontwarn androidx.**
6+
-keep class androidx.** { *; }
7+
-keep interface androidx.** { *; }

0 commit comments

Comments
 (0)