Skip to content

Commit 0967022

Browse files
authored
Merge pull request #35 from META-Xiao/feature/dependency-update
Feature/dependency update
2 parents 3392b34 + bd740f5 commit 0967022

14 files changed

Lines changed: 73 additions & 58 deletions

File tree

app/build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
plugins {
22
id 'com.android.application'
3-
id 'org.jetbrains.kotlin.android'
43
}
54

65
android {
76
namespace 'com.acc_ide'
8-
compileSdk 33
7+
compileSdk 35
98

109
defaultConfig {
1110
applicationId "com.acc_ide"
1211
minSdk 24
13-
targetSdk 33
12+
targetSdk 35
1413
versionCode 140
1514
versionName "1.4.0"
1615

@@ -50,10 +49,12 @@ android {
5049
sourceCompatibility JavaVersion.VERSION_17
5150
targetCompatibility JavaVersion.VERSION_17
5251
}
53-
kotlinOptions {
54-
jvmTarget = '17'
55-
apiVersion = '2.1'
56-
languageVersion = '2.1'
52+
kotlin {
53+
jvmToolchain(17)
54+
compilerOptions {
55+
apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3
56+
languageVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3
57+
}
5758
}
5859

5960
packaging {
@@ -86,20 +87,19 @@ dependencies {
8687
constraints {
8788
implementation("org.jetbrains.kotlin:kotlin-stdlib") {
8889
version {
89-
strictly("2.1.0")
90+
strictly("2.3.10")
9091
}
9192
}
9293
implementation("org.jetbrains.kotlin:kotlin-stdlib-common") {
9394
version {
94-
strictly("2.1.0")
95+
strictly("2.3.10")
9596
}
9697
}
9798
}
9899

99-
implementation(platform("io.github.rosemoe:editor-bom:0.23.7"))
100+
implementation(platform("io.github.rosemoe:editor-bom:0.24.4"))
100101
implementation 'io.github.rosemoe:editor'
101102
implementation 'io.github.rosemoe:language-textmate'
102-
implementation("io.github.Rosemoe.sora-editor:textmate-core:0.8.4")
103103
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
104104
testImplementation 'junit:junit:4.13.2'
105105
androidTestImplementation 'androidx.test.ext:junit:1.1.5'

app/src/main/AndroidManifest.xml

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

3434
<activity
3535
android:name="com.acc_ide.ui.main.MainActivity"
36-
android:configChanges="locale|layoutDirection|uiMode"
37-
android:exported="false">
36+
android:configChanges="locale|layoutDirection|uiMode|screenSize"
37+
android:exported="false"
38+
android:windowSoftInputMode="adjustResize">
3839
</activity>
3940
</application>
4041

app/src/main/assets/textmate/themes/dark.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@
201201
"name": "Class name",
202202
"scope": "entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution",
203203
"settings": {
204-
"fontStyle": "underline",
204+
"fontStyle": "",
205205
"foreground": "#FFCB6B"
206206
}
207207
},
208208
{
209209
"name": "Inherited class",
210210
"scope": "entity.other.inherited-class",
211211
"settings": {
212-
"fontStyle": "italic underline",
212+
"fontStyle": "italic",
213213
"foreground": "#FFCB6B"
214214
}
215215
},

app/src/main/assets/textmate/themes/light.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@
201201
"name": "Class name",
202202
"scope": "entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution",
203203
"settings": {
204-
"fontStyle": "underline",
204+
"fontStyle": "",
205205
"foreground": "#F57F17"
206206
}
207207
},
208208
{
209209
"name": "Inherited class",
210210
"scope": "entity.other.inherited-class",
211211
"settings": {
212-
"fontStyle": "italic underline",
212+
"fontStyle": "italic",
213213
"foreground": "#F57F17"
214214
}
215215
},

app/src/main/java/com/acc_ide/ui/main/MainActivity.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,23 @@ class MainActivity : AppCompatActivity() {
8787
themeManager.applyLanguage()
8888

8989
super.onCreate(savedInstanceState)
90+
9091
setContentView(R.layout.activity_main)
91-
92+
93+
// Enable system window insets handling
94+
androidx.core.view.WindowCompat.setDecorFitsSystemWindows(window, true)
95+
9296
// Set up toolbar
93-
val toolbar: Toolbar = findViewById(R.id.toolbar)
97+
val toolbar = findViewById<androidx.appcompat.widget.Toolbar>(R.id.toolbar)
9498
setSupportActionBar(toolbar)
99+
100+
// Handle IME insets for content frame
101+
val contentFrame = findViewById<android.widget.FrameLayout>(R.id.content_frame)
102+
androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(contentFrame) { v, insets ->
103+
val imeHeight = insets.getInsets(androidx.core.view.WindowInsetsCompat.Type.ime()).bottom
104+
v.setPadding(0, 0, 0, imeHeight)
105+
insets
106+
}
95107

96108
// Initialize drawer layout
97109
drawerLayout = findViewById(R.id.drawer_layout)

app/src/main/java/com/acc_ide/view/SymbolPanelView.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,7 @@ class SymbolPanelView @JvmOverloads constructor(
270270
text = label
271271
setTextAppearance(R.style.SymbolTextStyle)
272272
gravity = Gravity.CENTER
273-
minHeight = TypedValue.applyDimension(
274-
TypedValue.COMPLEX_UNIT_DIP, 34f, resources.displayMetrics
275-
).toInt()
276-
setPadding(0, 0, 0, 0)
277-
layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply {
273+
layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1f).apply {
278274
setMargins(2, 2, 2, 2)
279275
}
280276
// Add ripple click feedback

app/src/main/res/layout/activity_main.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:id="@+id/drawer_layout"
@@ -11,17 +11,20 @@
1111
<LinearLayout
1212
android:layout_width="match_parent"
1313
android:layout_height="match_parent"
14-
android:orientation="vertical">
14+
android:orientation="vertical"
15+
android:fitsSystemWindows="true">
1516

1617
<androidx.appcompat.widget.Toolbar
1718
android:id="@+id/toolbar"
1819
android:layout_width="match_parent"
19-
android:layout_height="?attr/actionBarSize"
20+
android:layout_height="48dp"
2021
android:background="@color/title_background"
2122
android:elevation="4dp"
2223
app:titleTextColor="@color/onPrimaryContainer_light"
2324
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
24-
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
25+
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
26+
android:contentInsetStart="0dp"
27+
android:contentInsetEnd="0dp" />
2528

2629
<FrameLayout
2730
android:id="@+id/content_frame"

app/src/main/res/layout/view_symbol_page.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<LinearLayout
1010
android:id="@+id/symbol_buttons_row1"
1111
android:layout_width="match_parent"
12-
android:layout_height="wrap_content"
12+
android:layout_height="0dp"
13+
android:layout_weight="1"
1314
android:orientation="horizontal"
1415
android:layout_marginBottom="1dp"
1516
android:weightSum="9" />
@@ -18,10 +19,11 @@
1819
<LinearLayout
1920
android:id="@+id/symbol_buttons_row2"
2021
android:layout_width="match_parent"
21-
android:layout_height="wrap_content"
22+
android:layout_height="0dp"
23+
android:layout_weight="1"
2224
android:orientation="horizontal"
2325
android:weightSum="9"
2426
android:layout_marginTop="1dp"
2527
android:layout_marginBottom="-2dp" />
2628

27-
</LinearLayout>
29+
</LinearLayout>

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
33
alias(libs.plugins.android.application) apply false
4-
alias(libs.plugins.kotlin.android) apply false
54
}

completion-library/build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
plugins {
22
id 'com.android.library'
3-
id 'org.jetbrains.kotlin.android'
43
}
54

65
android {
76
namespace 'com.acc_ide.completion'
8-
compileSdk 33
7+
compileSdk 35
98

109
defaultConfig {
1110
minSdk 24
12-
targetSdk 33
11+
targetSdk 35
1312

1413
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1514
consumerProguardFiles "consumer-rules.pro"
@@ -27,10 +26,12 @@ android {
2726
targetCompatibility JavaVersion.VERSION_17
2827
}
2928

30-
kotlinOptions {
31-
jvmTarget = '17'
32-
apiVersion = '2.1'
33-
languageVersion = '2.1'
29+
kotlin {
30+
jvmToolchain(17)
31+
compilerOptions {
32+
apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3
33+
languageVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3
34+
}
3435
}
3536
}
3637

@@ -42,7 +43,7 @@ dependencies {
4243
api project(':treesitter-core')
4344

4445
// Sora Editor - for completion API
45-
implementation platform("io.github.rosemoe:editor-bom:0.23.7")
46+
implementation platform("io.github.rosemoe:editor-bom:0.24.4")
4647
implementation 'io.github.rosemoe:editor'
4748
implementation 'io.github.rosemoe:language-textmate'
4849

0 commit comments

Comments
 (0)