Skip to content

Commit 0fa3c5d

Browse files
committed
Fix random startup crashes and gemini api
1 parent 70468b2 commit 0fa3c5d

File tree

361 files changed

+44854
-337
lines changed

Some content is hidden

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

361 files changed

+44854
-337
lines changed

.idea/AndroidProjectSystem.xml

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

.idea/appInsightsSettings.xml

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

.idea/codeStyles/Project.xml

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

.idea/compiler.xml

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

.idea/gradle.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

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

app/build.gradle.kts

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ plugins {
1313

1414
android {
1515
namespace = "org.cosmicide"
16-
compileSdk = 35
16+
compileSdk = 36
1717

1818
defaultConfig {
1919
val commit = getGitCommit()
2020
val GEMINI_API_KEY = "AIzaSyDR-8pmVxLaZHsQM0M5aw4gmyjxnU7ljNo"
2121

2222
applicationId = "org.cosmicide"
2323
minSdk = 26
24-
targetSdk = 35
25-
versionCode = 24
26-
versionName = "2.0.4"
24+
targetSdk = 36
25+
versionCode = 25
26+
versionName = "2.0.5"
2727
buildConfigField("String", "GIT_COMMIT", "\"$commit\"")
2828
buildConfigField("String", "GEMINI_API_KEY", "\"$GEMINI_API_KEY\"")
2929
}
@@ -141,41 +141,42 @@ fun getGitCommit(): String {
141141
}.standardOutput.asText.get().trim()
142142
println("Git commit: $commit")
143143
commit
144-
} catch (e: Exception) {
144+
} catch (_: Exception) {
145145
""
146146
}
147147
}
148148

149149
configurations.all {
150150
resolutionStrategy.force("com.squareup.okhttp3:okhttp:4.12.0")
151-
resolutionStrategy.force("com.google.guava:guava:33.1.0-android")
151+
resolutionStrategy.force("com.google.guava:guava:33.4.8-android")
152+
exclude(group = "commons-logging", module = "commons-logging")
152153
}
153154

154155
dependencies {
155-
implementation("com.android.tools:r8:8.5.35")
156-
implementation("com.android.tools.smali:smali-dexlib2:3.0.7")
156+
implementation("com.android.tools:r8:8.9.35")
157+
implementation("com.android.tools.smali:smali-dexlib2:3.0.9")
157158

158159
//noinspection GradleDependency
159-
implementation("com.github.Cosmic-Ide:DependencyResolver:868996895a")
160-
implementation("com.google.android.material:material:1.12.0")
161-
implementation("com.google.code.gson:gson:2.11.0")
160+
implementation("com.github.Cosmic-Ide:DependencyResolver:6e8b426647")
161+
implementation("com.google.android.material:material:1.14.0-alpha01")
162+
implementation("com.google.code.gson:gson:2.13.1")
162163

163164
implementation("com.github.haroldadmin:WhatTheStack:1.0.0-alpha04")
164165

165-
implementation("androidx.appcompat:appcompat:1.7.0")
166-
implementation("androidx.constraintlayout:constraintlayout:2.2.0-beta01")
167-
implementation("androidx.core:core-ktx:1.13.1")
166+
implementation("androidx.appcompat:appcompat:1.7.1")
167+
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
168+
implementation("androidx.core:core-ktx:1.16.0")
168169
implementation("androidx.core:core-splashscreen:1.1.0-rc01")
169-
implementation("androidx.documentfile:documentfile:1.1.0-alpha01")
170-
implementation("androidx.fragment:fragment-ktx:1.8.3")
171-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.5")
172-
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.5")
173-
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
170+
implementation("androidx.documentfile:documentfile:1.1.0")
171+
implementation("androidx.fragment:fragment-ktx:1.8.8")
172+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.1")
173+
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.1")
174+
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-beta01")
174175
implementation("androidx.viewpager2:viewpager2:1.1.0")
175-
implementation("androidx.activity:activity-ktx:1.9.2")
176-
implementation("androidx.startup:startup-runtime:1.2.0-rc01")
176+
implementation("androidx.activity:activity-ktx:1.10.1")
177+
implementation("androidx.startup:startup-runtime:1.2.0")
177178

178-
val editorVersion = "0.23.4-96c0abc-SNAPSHOT"
179+
val editorVersion = "0.23.5"
179180
//noinspection GradleDependency
180181
implementation("io.github.Rosemoe.sora-editor:editor:$editorVersion")
181182
//noinspection GradleDependency
@@ -188,7 +189,7 @@ dependencies {
188189
implementation("io.github.itsaky:nb-javac-android:17.0.0.3")
189190

190191
implementation("org.eclipse.jgit:org.eclipse.jgit:5.13.2.202306221912-r")
191-
implementation("com.github.sya-ri:kgit:1.0.6")
192+
implementation("com.github.sya-ri:kgit:1.1.0")
192193

193194
// markwon
194195
val markwonVersion = "4.6.2"
@@ -197,15 +198,13 @@ dependencies {
197198
implementation("io.noties.markwon:linkify:$markwonVersion")
198199

199200
implementation(projects.feature.aliuhook)
200-
implementation("de.maxr1998:modernandroidpreferences:2.4.0-beta1")
201+
implementation("de.maxr1998:modernandroidpreferences:2.4.0-beta2")
201202

202-
implementation("com.github.Cosmic-Ide.kotlinc-android:kotlinc:2a0a6a7291")
203-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1-Beta")
204-
implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3")
203+
implementation("com.github.Cosmic-Ide.kotlinc-android:kotlinc-android:fce2462f00")
204+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
205+
implementation("org.lsposed.hiddenapibypass:hiddenapibypass:6.1")
205206
implementation("org.slf4j:slf4j-simple:2.1.0-alpha1")
206207

207-
implementation("com.google.ai.client.generativeai:generativeai:0.9.0")
208-
209208
val shizukuVersion = "13.1.5"
210209
implementation("dev.rikka.shizuku:api:$shizukuVersion")
211210

@@ -223,12 +222,13 @@ dependencies {
223222
implementation(projects.feature.javaCompletion)
224223
implementation(projects.feature.project)
225224
implementation(projects.feature.codeNavigation)
225+
implementation(projects.feature.genai)
226226
implementation(projects.util)
227227
implementation(projects.jgit)
228228
implementation(projects.feature.treeView)
229229

230230
// jgit uses some methods like `transferTo` are only available from Android 13 onwards
231-
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.2")
231+
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
232232

233233
testImplementation("junit:junit:4.13.2")
234234
}
@@ -257,7 +257,7 @@ fun getSdkDir(): File {
257257
fun getCoreLambdaStubs(): File {
258258
val sdk = getSdkDir()
259259

260-
return sdk.resolve("build-tools").listFiles().orEmpty().sortedBy { it.name }.last()
260+
return sdk.resolve("build-tools").listFiles().orEmpty().maxByOrNull { it.name }!!
261261
.resolve("core-lambda-stubs.jar")
262262
}
263263

@@ -269,4 +269,3 @@ fun getAndroidJar(): File {
269269
.sortedBy { it.name }
270270
return sdks.last().resolve("android.jar")
271271
}
272-

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
<activity
6464
android:name=".MainActivity"
65+
android:windowSoftInputMode="adjustResize"
6566
android:exported="true">
6667
<intent-filter>
6768
<action android:name="android.intent.action.MAIN" />

0 commit comments

Comments
 (0)