Skip to content

Commit b9bd8e8

Browse files
committed
Updates
* Update libraries, Gradle, Compose, Kotlin, AGP, etc. * Fix link to stable apk. * Fix missing snacks. * Add missing init for libsu. * VersionCode is updated for every CI build. * Add experimental new installer and Install All button. This new installer should better handle the installation of multiple simultaneous updates. Can be enabled in settings.
1 parent dec84e6 commit b9bd8e8

54 files changed

Lines changed: 433 additions & 894 deletions

Some content is hidden

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The 3.x branch is a full rewrite using modern technologies like **Jetpack Compos
1919
* **Languages**: Albanian, Arabic, Burmese, Dutch, English, German, Hebrew, Hungarian, Indonesian, Italian, Korean, Malay, Portuguese, Romanian, Russian, Simplified Chinese, Spanish, Traditional Chinese, Turkish.
2020

2121
# Download
22-
* [Stable Release (3.0.3)](https://github.com/rumboalla/apkupdater/releases/latest/download/com.apkupdater-release.apk)
22+
* [Stable Release (3.0.3)](https://github.com/rumboalla/apkupdater/releases/download/3.0.3/com.apkupdater-release.apk)
2323
* [CI Pre-release Builds](https://github.com/rumboalla/apkupdater/releases?q=CI&expanded=true)
2424
* [Older releases](https://github.com/rumboalla/apkupdater/releases)
2525

app/build.gradle.kts

Lines changed: 64 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
import java.util.Properties
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22
import java.io.FileInputStream
3-
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
3+
import java.util.Properties
4+
45

56
plugins {
67
id("com.android.application")
7-
id("org.jetbrains.kotlin.android")
8+
id("org.jetbrains.kotlin.plugin.compose")
9+
}
10+
11+
kotlin {
12+
compilerOptions {
13+
jvmTarget.set(JvmTarget.JVM_17)
14+
}
815
}
916

1017
android {
1118
namespace = "com.apkupdater"
12-
compileSdk = 34
19+
compileSdk = 36
1320

1421
val buildNumber = System.getenv("BUILD_NUMBER").orEmpty()
1522
defaultConfig {
1623
applicationId = "com.apkupdater" + System.getenv("BUILD_TAG").orEmpty()
17-
minSdk = 21
18-
targetSdk = 34
19-
versionCode = 52
24+
minSdk = 23
25+
targetSdk = 36
26+
versionCode = if (buildNumber.isEmpty()) 52 else buildNumber.toInt()
2027
versionName = if (buildNumber.isEmpty()) "3.0.3" else "0.0.$buildNumber"
2128
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2229
vectorDrawables.useSupportLibrary = true
@@ -31,7 +38,7 @@ android {
3138
storePassword = props.getProperty("keystore.password")
3239
keyAlias = props.getProperty("keystore.keyalias")
3340
keyPassword = props.getProperty("keystore.keypassword")
34-
} catch (ignored: Exception) {
41+
} catch (_: Exception) {
3542
val config = signingConfigs.getByName("debug")
3643
storeFile = config.storeFile
3744
storePassword = config.storePassword
@@ -51,24 +58,16 @@ android {
5158
}
5259
}
5360

54-
applicationVariants.configureEach {
55-
outputs.configureEach {
56-
val variant = (this as BaseVariantOutputImpl)
57-
variant.outputFileName = defaultConfig.applicationId + "-" + buildType.name + ".apk"
58-
}
59-
}
60-
6161
compileOptions {
62-
sourceCompatibility = JavaVersion.VERSION_1_8
63-
targetCompatibility = JavaVersion.VERSION_1_8
62+
sourceCompatibility = JavaVersion.VERSION_17
63+
targetCompatibility = JavaVersion.VERSION_17
6464
}
6565

66-
kotlinOptions { jvmTarget = "1.8" }
66+
6767
buildFeatures {
6868
compose = true
6969
buildConfig = true
7070
}
71-
composeOptions { kotlinCompilerExtensionVersion = "1.5.1" }
7271

7372
packaging {
7473
resources {
@@ -83,37 +82,58 @@ android {
8382

8483
dependencies {
8584

86-
implementation("androidx.activity:activity-compose:1.8.2")
87-
implementation("androidx.compose.material3:material3:1.2.1")
88-
implementation("androidx.compose.ui:ui:1.6.4")
89-
implementation("androidx.core:core-ktx:1.12.0")
90-
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.7.0")
91-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
92-
implementation("androidx.navigation:navigation-compose:2.7.7")
93-
implementation("androidx.navigation:navigation-runtime-ktx:2.7.7")
94-
implementation("androidx.tv:tv-foundation:1.0.0-alpha10")
95-
implementation("androidx.work:work-runtime-ktx:2.9.0")
85+
val composeBom = platform("androidx.compose:compose-bom:2026.02.01")
86+
implementation(composeBom)
87+
implementation("androidx.activity:activity-compose:1.12.4")
88+
implementation("androidx.compose.material3:material3")
89+
implementation("androidx.compose.material:material-icons-core")
90+
implementation("androidx.compose.ui:ui")
91+
implementation("androidx.core:core-ktx:1.17.0")
92+
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.10.0")
93+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.10.0")
94+
implementation("androidx.navigation:navigation-compose:2.9.7")
95+
implementation("androidx.navigation:navigation-runtime-ktx:2.9.7")
96+
implementation("androidx.tv:tv-foundation:1.0.0-alpha12")
97+
implementation("androidx.work:work-runtime-ktx:2.11.1")
9698
implementation("com.github.rumboalla.KryptoPrefs:kryptoprefs-gson:0.4.3")
9799
implementation("com.github.rumboalla.KryptoPrefs:kryptoprefs:0.4.3")
98-
implementation("com.github.topjohnwu.libsu:core:5.2.1")
99-
implementation("com.aurora:gplayapi:3.2.11")
100-
implementation("com.google.code.gson:gson:2.10.1")
101-
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
102-
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
103-
implementation("com.squareup.retrofit2:retrofit:2.11.0")
104-
implementation("io.coil-kt:coil-compose:2.6.0")
100+
implementation("com.github.topjohnwu.libsu:core:6.0.0")
101+
implementation("com.auroraoss:gplayapi:3.5.8")
102+
implementation("com.google.code.gson:gson:2.13.2")
103+
implementation("com.squareup.okhttp3:logging-interceptor:5.3.2")
104+
implementation("com.squareup.retrofit2:converter-gson:3.0.0")
105+
implementation("com.squareup.retrofit2:retrofit:3.0.0")
106+
implementation("io.coil-kt.coil3:coil-compose:3.4.0")
107+
implementation("io.coil-kt.coil3:coil-network-okhttp:3.4.0")
105108
implementation("io.github.g00fy2:versioncompare:1.5.0")
106-
implementation("io.insert-koin:koin-android:3.5.3")
107-
implementation("io.insert-koin:koin-androidx-compose:3.5.3")
108-
implementation("org.jsoup:jsoup:1.16.1")
109+
implementation("io.insert-koin:koin-android:4.1.1")
110+
implementation("io.insert-koin:koin-androidx-compose:4.1.1")
111+
implementation("org.jsoup:jsoup:1.22.1")
109112

110113
testImplementation("junit:junit:4.13.2")
111114

112-
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.6.4")
113-
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
114-
androidTestImplementation("androidx.test.ext:junit:1.1.5")
115+
androidTestImplementation(composeBom)
116+
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
117+
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
118+
androidTestImplementation("androidx.test.ext:junit:1.3.0")
115119

116-
debugImplementation("androidx.compose.ui:ui-test-manifest:1.6.4")
117-
debugImplementation("androidx.compose.ui:ui-tooling:1.6.4")
120+
debugImplementation("androidx.compose.ui:ui-test-manifest")
121+
debugImplementation("androidx.compose.ui:ui-tooling")
122+
123+
}
118124

125+
androidComponents {
126+
onVariants { variant ->
127+
variant.outputs.forEach { _ ->
128+
tasks.configureEach {
129+
if (name == "package${variant.name.replaceFirstChar { it.uppercase() }}") {
130+
doLast {
131+
outputs.files.files
132+
.flatMap { it.walkTopDown().filter { f -> f.extension == "apk" }.toList() }
133+
.forEach { apk -> runCatching { apk.copyTo(File(apk.parentFile, "${android.defaultConfig.applicationId}-${variant.buildType}.apk"), true) }.getOrNull() }
134+
}
135+
}
136+
}
137+
}
138+
}
119139
}

app/proguard-rules.pro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Gson
44
-keep class com.google.gson.reflect.TypeToken { *; }
55
-keep class * extends com.google.gson.reflect.TypeToken
6+
-dontwarn com.google.re2j.Matcher
7+
-dontwarn com.google.re2j.Pattern
68

79
# OkHttp
810
-keep,allowobfuscation,allowshrinking class okhttp3.RequestBody

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
<uses-permission android:name="android.permission.INTERNET" />
1010
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
11-
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
11+
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:ignore="RequestInstallPackagesPolicy" />
1212
<uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
13-
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:ignore="QueryAllPackagesPermission" />
13+
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:ignore="PackageVisibilityPolicy,QueryAllPackagesPermission" />
1414

1515
<application
1616
android:name=".application.App"

app/src/main/kotlin/androidx/compose/material3/pullrefresh/PullRefresh.kt

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

0 commit comments

Comments
 (0)