android: toolchain AGP 9.1.1 / Gradle 9.3.1 / Kotlin 2.2.21 / compileSdk 37, BOM 2026.09.00 + material3 1.5.0-beta01
Built-in Kotlin (kotlin-android removed), Java 11 compile options (compose 1.12), proguard-android-optimize.txt (the non-optimize file is rejected by AGP 9), ExposedDropdownMenu import, minSdk 23 kept via tools:overrideLibrary for material3 1.5 libs that declare minSdk 24. -PshortNdkCommands for deep worktree paths. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
65989b3a5a
commit
6fd03f37f7
6 files changed
+25
-22
No files matched your search
@@ -1,5 +1,4 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
||||
|
||||
/* Optional .env next to this project: S3/update settings and signing (see .env.example).
|
||||
@@ -42,9 +41,9 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "one.shx.strongswan.ext"
|
||||
compileSdk = 36
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 36
|
||||
compileSdk = 37
|
||||
minSdk = 23
|
||||
targetSdk = 36
|
||||
|
||||
versionCode 159
|
||||
versionName "2.14.6"
|
||||
@@ -78,6 +77,10 @@ android {
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments '-j' + Runtime.runtime.availableProcessors()
|
||||
/* deep checkout paths (e.g. git worktrees) overflow the Windows command line; opt in with -PshortNdkCommands */
|
||||
if (project.hasProperty('shortNdkCommands')) {
|
||||
arguments 'APP_SHORT_COMMANDS=true', 'LOCAL_SHORT_COMMANDS=true'
|
||||
}
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
||||
}
|
||||
}
|
||||
@@ -114,7 +117,7 @@ android {
|
||||
Smoke-test a release build on a device before publishing. */
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.txt'
|
||||
if (keystoreFile) {
|
||||
signingConfig signingConfigs.release
|
||||
} else {
|
||||
@@ -131,11 +134,8 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
buildFeatures {
|
||||
compose true
|
||||
@@ -158,15 +158,15 @@ dependencies {
|
||||
/* BOM 2026.06.01 = compose-ui 1.11.4. The Expressive API (MaterialExpressiveTheme,
|
||||
MotionScheme.expressive, LoadingIndicator, MaterialShapes) lives only in
|
||||
material3 1.5.0-alpha/beta, so material3 is pinned explicitly.
|
||||
1.5.0-alpha18 is the newest line that still builds with AGP 8.13 / compileSdk 36:
|
||||
1.5.0-beta01 is the newest line that still builds with AGP 8.13 / compileSdk 36:
|
||||
alpha19+ (and 1.5.0-beta01, BOM 2026.09.00 = compose 1.12) require AGP 9.1 and
|
||||
compileSdk 37. Unpin once those are adopted and 1.5.0 is stable. */
|
||||
def composeBom = platform('androidx.compose:compose-bom:2026.06.01')
|
||||
def composeBom = platform('androidx.compose:compose-bom:2026.09.00')
|
||||
implementation composeBom
|
||||
implementation 'androidx.compose.ui:ui'
|
||||
implementation 'androidx.compose.material3:material3:1.5.0-alpha18'
|
||||
implementation 'androidx.compose.material3:material3:1.5.0-beta01'
|
||||
/* adaptive-navigation-suite (NavigationSuiteScaffold) requires minSdk 23 */
|
||||
implementation 'androidx.compose.material3:material3-adaptive-navigation-suite:1.5.0-alpha18'
|
||||
implementation 'androidx.compose.material3:material3-adaptive-navigation-suite:1.5.0-beta01'
|
||||
implementation 'androidx.compose.material:material-icons-extended'
|
||||
implementation 'androidx.activity:activity-compose:1.11.0'
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- material3-ripple 1.5.0-beta01 declares minSdk 24; the app keeps minSdk 23. -->
|
||||
<uses-sdk tools:overrideLibrary="androidx.compose.material3.ripple,androidx.compose.material3.adaptive.navigationsuite,androidx.compose.material3" />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
|
||||
+4
-3
@@ -47,9 +47,10 @@ import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Checkbox
|
||||
import androidx.compose.material3.DropdownMenuItem
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.ExposedDropdownMenu
|
||||
import androidx.compose.material3.ExposedDropdownMenuBox
|
||||
import androidx.compose.material3.ExposedDropdownMenuDefaults
|
||||
import androidx.compose.material3.MenuAnchorType
|
||||
import androidx.compose.material3.ExposedDropdownMenuAnchorType
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
@@ -411,7 +412,7 @@ fun ProfileFormScreen(
|
||||
enabled = enabled,
|
||||
label = { Text(stringResource(R.string.profile_vpn_type_label)) },
|
||||
trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(typeExpanded) },
|
||||
modifier = Modifier.fillMaxWidth().menuAnchor(MenuAnchorType.PrimaryNotEditable),
|
||||
modifier = Modifier.fillMaxWidth().menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable),
|
||||
)
|
||||
ExposedDropdownMenu(expanded = typeExpanded, onDismissRequest = { typeExpanded = false }) {
|
||||
VpnType.values().forEachIndexed { index, type ->
|
||||
@@ -575,7 +576,7 @@ fun ProfileFormScreen(
|
||||
enabled = enabled,
|
||||
label = { Text(stringResource(R.string.profile_select_apps)) },
|
||||
trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(appsExpanded) },
|
||||
modifier = Modifier.fillMaxWidth().menuAnchor(MenuAnchorType.PrimaryNotEditable),
|
||||
modifier = Modifier.fillMaxWidth().menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable),
|
||||
)
|
||||
ExposedDropdownMenu(expanded = appsExpanded, onDismissRequest = { appsExpanded = false }) {
|
||||
SelectedAppsHandling.values().forEachIndexed { index, handling ->
|
||||
|
||||
@@ -4,9 +4,9 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.13.0'
|
||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.20'
|
||||
classpath 'org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.1.20'
|
||||
classpath 'com.android.tools.build:gradle:9.1.1'
|
||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.21'
|
||||
classpath 'org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.2.21'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
android.enableJetifier=false
|
||||
android.nonFinalResIds=false
|
||||
android.nonTransitiveRClass=false
|
||||
android.useAndroidX=true
|
||||
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
|
||||
@@ -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-8.13-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
|
||||
Reference in new issue
Block a user