Skip to content

Commit 894e92a

Browse files
authored
Build with 16kb page alignment (#288)
1 parent de2b3dc commit 894e92a

File tree

11 files changed

+69
-27
lines changed

11 files changed

+69
-27
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
flutter-version: "3.29.2"
3535

3636
- name: Setup bundletool for APK generation
37-
uses: amyu/setup-bundletool@f7a6fdd8e04bb23d2fdf3c2f60c9257a6298a40a
37+
run: |
38+
curl -Lo bundletool.jar https://github.com/google/bundletool/releases/download/1.18.1/bundletool-all-1.18.1.jar
3839
3940
- name: Install the appstore connect key material
4041
env:
@@ -129,7 +130,7 @@ jobs:
129130
TOKEN: ${{ secrets.MACHINE_USER_PAT }}
130131
GOOGLE_PLAY_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_PLAY_KEYSTORE_PASSWORD }}
131132
run: |
132-
bundletool build-apks \
133+
java -jar bundletool.jar build-apks \
133134
--bundle=build/app/outputs/bundle/release/app-release.aab \
134135
--output=build/app/outputs/apk/release/MobileNebula.apks \
135136
--mode=universal \

.github/workflows/smoke.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches:
77
- main
88
pull_request:
9+
types: [opened, synchronize, labeled, reopened]
910

1011
jobs:
1112
build-android:
@@ -45,11 +46,13 @@ jobs:
4546
- name: Build Android debug
4647
run: flutter build appbundle --debug
4748

48-
- name: Setup bundletool
49-
if: github.ref == 'refs/heads/main'
50-
uses: amyu/setup-bundletool@f7a6fdd8e04bb23d2fdf3c2f60c9257a6298a40a
49+
- name: Setup bundletool for APK generation
50+
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'release-check')
51+
run: |
52+
curl -Lo bundletool.jar https://github.com/google/bundletool/releases/download/1.18.1/bundletool-all-1.18.1.jar
53+
5154
- name: Install the google play key material
52-
if: github.ref == 'refs/heads/main'
55+
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'release-check')
5356
env:
5457
GOOGLE_PLAY_API_JWT_BASE64: ${{ secrets.GOOGLE_PLAY_API_JWT_BASE64 }}
5558
GOOGLE_PLAY_KEYSTORE_BASE64: ${{ secrets.GOOGLE_PLAY_KEYSTORE_BASE64 }}
@@ -61,27 +64,29 @@ jobs:
6164
GOOGLE_PLAY_KEYSTORE_PATH="$RUNNER_TEMP/gp_signing.jks"
6265
echo "GOOGLE_PLAY_KEYSTORE_PATH=$GOOGLE_PLAY_KEYSTORE_PATH" >> $GITHUB_ENV
6366
echo -n "$GOOGLE_PLAY_KEYSTORE_BASE64" | base64 --decode --output "$GOOGLE_PLAY_KEYSTORE_PATH"
67+
6468
- name: Generate debug apk
65-
if: github.ref == 'refs/heads/main'
69+
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'release-check')
6670
env:
6771
TOKEN: ${{ secrets.MACHINE_USER_PAT }}
6872
GOOGLE_PLAY_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_PLAY_KEYSTORE_PASSWORD }}
6973
run: |
70-
bundletool build-apks \
74+
java -jar bundletool.jar build-apks \
7175
--bundle=build/app/outputs/bundle/debug/app-debug.aab \
7276
--output=build/app/outputs/apk/debug/app-debug.apks \
7377
--mode=universal \
7478
--ks=$GOOGLE_PLAY_KEYSTORE_PATH \
7579
--ks-key-alias=key \
7680
--ks-pass=pass:$GOOGLE_PLAY_KEYSTORE_PASSWORD
7781
unzip -p build/app/outputs/apk/debug/app-debug.apks universal.apk > build/app/outputs/apk/debug/app-debug.apk
82+
7883
- name: Collect debug apk
79-
if: github.ref == 'refs/heads/main'
84+
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'release-check')
8085
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #4.6.1
8186
with:
8287
name: MobileNebulaDebug.apk
8388
path: build/app/outputs/apk/debug/app-debug.apk
84-
retention-days: 60
89+
retention-days: 5
8590

8691
build-ios:
8792
name: iOS
@@ -116,3 +121,11 @@ jobs:
116121
cd ios
117122
pod install
118123
xcodebuild -workspace Runner.xcworkspace -scheme Runner -configuration Release clean archive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -archivePath "build/MobileNebula.xcarchive"
124+
125+
- name: Collect iOS artifacts
126+
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'release-check')
127+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #4.6.1
128+
with:
129+
name: MobileNebula.xcarchive
130+
path: ios/build/MobileNebula.xcarchive
131+
retention-days: 5

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Run `flutter doctor` and fix everything it complains before proceeding
2222

2323
- Copy `env.sh.example` and set it up for your machine
2424
- Ensure you have run `gomobile init`
25-
- In Android Studio, make sure you have the current ndk installed by going to Tools -> SDK Manager, go to the SDK Tools tab, check the `Show package details` box, expand the NDK section and select `27.0.12077973` version.
25+
- In Android Studio, make sure you have the current ndk installed by going to Tools -> SDK Manager, go to the SDK Tools tab, check the `Show package details` box, expand the NDK section and select `28.2.13676358` version.
2626
- Ensure you have downloaded an ndk via android studio, this is likely not the default one and you need to check the
2727
`Show package details` box to select the correct version. The correct version comes from the error when you try and compile
2828
- Make sure you have `gem` installed with `sudo gem install`

android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ if (flutterVersionName == null) {
2626
android {
2727
namespace "net.defined.mobile_nebula"
2828

29-
compileSdkVersion 34
29+
compileSdkVersion 36
3030

3131
// default ndk version for AGP 8.7: https://developer.android.com/build/releases/past-releases/agp-8-7-0-release-notes
32-
ndkVersion "27.0.12077973"
32+
ndkVersion "28.2.13676358"
3333

3434
sourceSets {
3535
main.java.srcDirs += 'src/main/kotlin'
@@ -38,7 +38,7 @@ android {
3838
defaultConfig {
3939
applicationId "net.defined.mobile_nebula"
4040
minSdkVersion 26 //flutter.minSdkVersion
41-
targetSdkVersion 34 //flutter.targetSdkVersion
41+
targetSdkVersion 36 //flutter.targetSdkVersion
4242
versionCode flutterVersionCode.toInteger()
4343
versionName flutterVersionName
4444
}

android/app/src/main/kotlin/net/defined/mobile_nebula/PackageInfo.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class PackageInfo(private val context: Context) {
1717
private val appInfo: ApplicationInfo = context.applicationInfo
1818

1919
fun getVersion(): String {
20-
val version: String = pInfo.versionName
20+
val version: String? = pInfo.versionName
2121
val build: Long = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
2222
pInfo.longVersionCode
2323
else

android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
org.gradle.jvmargs=-Xmx1536M
22
android.useAndroidX=true
33
android.enableJetifier=true
4-
android.defaults.buildfeatures.buildconfig=true
54
android.nonTransitiveRClass=false
65
android.nonFinalResIds=false

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip

android/mobileNebula/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
configurations.maybeCreate("default")
2+
3+
def sdkDir
4+
def ndkPath
5+
6+
rootProject.project(':app') { p ->
7+
sdkDir = p.android.sdkDirectory
8+
ndkPath = p.android.ndkDirectory
9+
}
10+
211
exec {
312
workingDir '../../'
413
commandLine './gen-artifacts.sh', 'android'
14+
environment("ANDROID_HOME", sdkDir)
15+
environment("ANDROID_NDK_HOME", ndkPath)
516
}
17+
618
artifacts.add("default", file('mobileNebula.aar'))

android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pluginManagement {
1919
plugins {
2020
id "org.gradle.toolchains.foojay-resolver-convention" version "0.8.0"
2121
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22-
id "com.android.application" version '8.8.0' apply false
22+
id "com.android.application" version '8.13.0' apply false
2323
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
2424
}
2525

nebula/go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ toolchain go1.22.4
99
require (
1010
github.com/DefinedNet/dnapi v0.0.0-20241212205635-1d1f0084d118
1111
github.com/sirupsen/logrus v1.9.3
12-
github.com/slackhq/nebula v1.9.6
13-
golang.org/x/crypto v0.32.0
12+
github.com/slackhq/nebula v1.9.7
13+
golang.org/x/crypto v0.43.0
1414
gopkg.in/yaml.v2 v2.4.0
1515
)
1616

@@ -39,13 +39,13 @@ require (
3939
github.com/vishvananda/netlink v1.3.0 // indirect
4040
github.com/vishvananda/netns v0.0.4 // indirect
4141
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
42-
golang.org/x/mobile v0.0.0-20250106192035-c31d5b91ecc3 // indirect
43-
golang.org/x/mod v0.22.0 // indirect
44-
golang.org/x/net v0.34.0 // indirect
45-
golang.org/x/sync v0.10.0 // indirect
46-
golang.org/x/sys v0.29.0 // indirect
47-
golang.org/x/term v0.28.0 // indirect
48-
golang.org/x/tools v0.29.0 // indirect
42+
golang.org/x/mobile v0.0.0-20251021151156-188f512ec823 // indirect
43+
golang.org/x/mod v0.29.0 // indirect
44+
golang.org/x/net v0.46.0 // indirect
45+
golang.org/x/sync v0.17.0 // indirect
46+
golang.org/x/sys v0.37.0 // indirect
47+
golang.org/x/term v0.36.0 // indirect
48+
golang.org/x/tools v0.38.0 // indirect
4949
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
5050
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect
5151
golang.zx2c4.com/wireguard/windows v0.5.3 // indirect

0 commit comments

Comments
 (0)