Skip to content

Commit fd3b01a

Browse files
authored
chore: upgrade gradle and add compose dependencies (#58)
1 parent a5f9eff commit fd3b01a

6 files changed

Lines changed: 56 additions & 11 deletions

File tree

app/build.gradle

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ plugins {
1010
id 'org.jetbrains.kotlin.plugin.serialization'
1111
// enable if needed
1212
// id 'dev.reformator.stacktracedecoroutinator'
13-
1413
id 'io.sentry.android.gradle' version '6.1.0'
14+
alias(libs.plugins.compose.compiler)
1515
}
1616

1717
android {
1818
compileSdk = 36
19-
buildToolsVersion = '35.0.0'
2019
namespace = 'io.github.landwarderer.futon'
2120

2221
dependenciesInfo {
@@ -78,6 +77,7 @@ android {
7877
buildFeatures {
7978
viewBinding true
8079
buildConfig true
80+
compose true
8181
}
8282
packagingOptions {
8383
resources {
@@ -86,7 +86,10 @@ android {
8686
'META-INF/NOTICE.md'
8787
]
8888
}
89-
}
89+
jniLibs {
90+
useLegacyPackaging true
91+
}
92+
}
9093
sourceSets {
9194
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
9295
main.java.srcDirs += 'src/main/kotlin/'
@@ -149,6 +152,10 @@ dependencies {
149152
exclude group: 'org.json', module: 'json'
150153
}
151154

155+
def composeBom = platform(libs.compose.bom)
156+
implementation composeBom
157+
androidTestImplementation composeBom
158+
152159
coreLibraryDesugaring libs.desugar.jdk.libs
153160
implementation libs.kotlin.stdlib
154161
implementation libs.kotlinx.coroutines.android
@@ -217,9 +224,21 @@ dependencies {
217224
implementation libs.conscrypt.android
218225
implementation libs.sentry.android
219226

227+
implementation libs.compose.material3
228+
implementation libs.compose.foundation
229+
implementation libs.compose.ui
230+
implementation libs.compose.ui.tooling.preview
231+
implementation libs.compose.material3.adaptive
232+
implementation libs.androidx.activity.compose
233+
implementation libs.androidx.lifecycle.viewmodel.compose
234+
implementation libs.compose.runtime.livedata
235+
implementation libs.compose.runtime.rxjava2
236+
220237
debugImplementation libs.leakcanary.android
221238
nightlyImplementation libs.leakcanary.android
222239
debugImplementation libs.workinspector
240+
debugImplementation libs.compose.ui.tooling
241+
debugImplementation libs.compose.ui.test.manifest
223242

224243
testImplementation libs.junit
225244
testImplementation libs.json
@@ -229,6 +248,7 @@ dependencies {
229248
androidTestImplementation libs.androidx.rules
230249
androidTestImplementation libs.androidx.test.core
231250
androidTestImplementation libs.androidx.junit
251+
androidTestImplementation libs.compose.ui.test.junit4
232252

233253
androidTestImplementation libs.kotlinx.coroutines.test
234254

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
android:backupAgent="io.github.landwarderer.futon.backups.domain.AppBackupAgent"
5353
android:dataExtractionRules="@xml/backup_rules"
5454
android:enableOnBackInvokedCallback="@bool/is_predictive_back_enabled"
55-
android:extractNativeLibs="true"
56-
android:fullBackupContent="@xml/backup_content"
55+
android:fullBackupContent="@xml/backup_content"
5756
android:fullBackupOnly="true"
5857
android:hasFragileUserData="true"
5958
android:restoreAnyVersion="true"

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ plugins {
66
alias(libs.plugins.room) apply false
77
alias(libs.plugins.kotlinx.serizliation) apply false
88
// alias(libs.plugins.decoroutinator) apply false
9+
alias(libs.plugins.compose.compiler) apply false
910
}

gradle.properties

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# org.gradle.parallel=true
1313
#Thu Mar 26 21:41:29 IST 2026
1414
android.enableJetifier=false
15-
android.enableR8.fullMode=true
16-
android.nonFinalResIds=true
1715
android.nonTransitiveRClass=true
1816
android.useAndroidX=true
1917
kotlin.code.style=official
@@ -25,3 +23,13 @@ org.gradle.workers.max=8
2523
org.gradle.caching=true
2624
org.gradle.configuration-cache=true
2725
kotlin.incremental=true
26+
android.defaults.buildfeatures.resvalues=true
27+
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
28+
android.enableAppCompileTimeRClass=false
29+
android.usesSdkInManifest.disallowed=false
30+
android.uniquePackageNames=false
31+
android.dependency.useConstraints=true
32+
android.r8.strictFullModeForKeepRules=false
33+
android.r8.optimizedResourceShrinking=false
34+
android.builtInKotlin=false
35+
android.newDsl=false

gradle/libs.versions.toml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ desugar = "2.1.5"
1818
diskLruCache = "1.5"
1919
documentfile = "1.1.0"
2020
fragment = "1.8.9"
21-
gradle = "8.13.2"
21+
gradle = "9.1.1"
2222
guava = "33.4.8-android"
2323
hilt = "1.3.0"
2424
json = "20250517"
2525
junit = "4.13.2"
2626
junitKtx = "1.3.0"
2727
kotlin = "2.2.10"
2828
kizzyRpc = "ad8f2e32eb"
29-
ksp = "2.2.10-2.0.2"
29+
ksp = "2.3.2"
3030
leakcanary = "3.0-alpha-8"
3131
lifecycle = "2.9.4"
3232
markwon = "4.6.2"
@@ -53,6 +53,9 @@ webkit = "1.14.0"
5353
workRuntime = "2.10.5"
5454
workinspector = "1.2"
5555
window = "1.3.0"
56+
composeBom = "2026.03.00"
57+
activityCompose = "1.13.0"
58+
lifecycleViewmodelCompose = "2.10.0"
5659

5760
[libraries]
5861
adapterdelegates = { module = "com.hannesdorfmann:adapterdelegates4-kotlin-dsl", version.ref = "adapterdelegates" }
@@ -124,6 +127,19 @@ ssiv = { module = "com.github.AppFuton:subsampling-scale-image-view", version.re
124127
workinspector = { module = "com.github.Koitharu:WorkInspector", version.ref = "workinspector" }
125128
androidx-window = { module = "androidx.window:window", version.ref = "window" }
126129
injekt-core = { module = "uy.kohesive.injekt:injekt-core", version = "1.16.1" }
130+
compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
131+
compose-ui = { module = "androidx.compose.ui:ui" }
132+
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
133+
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
134+
compose-foundation = { module = "androidx.compose.foundation:foundation" }
135+
compose-material3 = { module = "androidx.compose.material3:material3" }
136+
compose-material3-adaptive = { module = "androidx.compose.material3.adaptive:adaptive" }
137+
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
138+
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
139+
compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" }
140+
compose-runtime-rxjava2 = { module = "androidx.compose.runtime:runtime-rxjava2" }
141+
compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }
142+
compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
127143

128144
[plugins]
129145
android-application = { id = "com.android.application", version.ref = "gradle" }
@@ -133,3 +149,4 @@ kotlinx-serizliation = { id = "org.jetbrains.kotlin.plugin.serialization", versi
133149
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
134150
room = { id = "androidx.room", version.ref = "room" }
135151
decoroutinator = { id = "dev.reformator.stacktracedecoroutinator", version.ref = "decoroutinator" }
152+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8fad3d78296ca518113f3d29016617c7f9367dc005f932bd9d93bf45ba46072b
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
3+
distributionSha256Sum=b266d5ff6b90eada6dc3b20cb090e3731302e553a27c5d3e4df1f0d76beaff06
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)