Skip to content

Commit 7f24d2f

Browse files
Update for Trilium Next
1 parent 42aa9a8 commit 7f24d2f

File tree

8 files changed

+31
-25
lines changed

8 files changed

+31
-25
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.idea
12
*.iml
23
.gradle
34
/local.properties
@@ -14,3 +15,5 @@
1415
.cxx
1516
local.properties
1617
/gradle/wrapper/gradle-wrapper.jar
18+
/app/release
19+
/signing_key.jks

app/build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ plugins {
66
}
77

88
android {
9-
compileSdkVersion 34
10-
buildToolsVersion "34.0.0"
11-
129
defaultConfig {
1310
applicationId "kellerar.triliumdroid"
1411
minSdkVersion 26
15-
targetSdkVersion 34
12+
compileSdk 35
13+
targetSdkVersion 35
1614
versionCode 1
1715
versionName "0.59.4"
1816

@@ -28,6 +26,9 @@ android {
2826

2927
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
3028
}
29+
debug {
30+
applicationIdSuffix ".debug"
31+
}
3132
}
3233
buildFeatures {
3334
viewBinding true
@@ -44,18 +45,17 @@ android {
4445
}
4546

4647
dependencies {
47-
implementation 'androidx.core:core-ktx:1.10.1'
48-
def nav_version = "2.7.1"
48+
def nav_version = "2.8.4"
4949

50-
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.20"
51-
implementation 'androidx.core:core-ktx:1.10.1'
52-
implementation 'androidx.appcompat:appcompat:1.6.1'
50+
implementation "org.jetbrains.kotlin:kotlin-stdlib:2.0.20"
51+
implementation 'androidx.core:core-ktx:1.15.0'
52+
implementation 'androidx.appcompat:appcompat:1.7.0'
5353
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
5454
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
55-
implementation "androidx.fragment:fragment-ktx:1.6.1"
56-
implementation 'com.google.android.material:material:1.9.0'
55+
implementation "androidx.fragment:fragment-ktx:1.8.5"
56+
implementation 'com.google.android.material:material:1.12.0'
5757
implementation "androidx.preference:preference-ktx:1.2.1"
58-
implementation "com.squareup.okhttp3:okhttp:4.10.0"
58+
implementation "com.squareup.okhttp3:okhttp:4.12.0"
5959

6060
implementation "org.wordpress:aztec:v1.7.0"
6161

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<provider
3232
android:name=".TriliumFileProvider"
33-
android:authorities="eu.fliegendewurst.fileprovider"
33+
android:authorities="${applicationId}.provider"
3434
android:exported="false"
3535
android:grantUriPermissions="true">
3636
<meta-data

app/src/main/kotlin/eu/fliegendewurst/triliumdroid/Cache.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,23 +965,26 @@ object Cache {
965965
// TODO: do something here
966966
}
967967

968+
// see https://github.com/TriliumNext/Notes/tree/develop/db
969+
// and https://github.com/TriliumNext/Notes/blob/develop/src/services/app_info.ts
968970
companion object {
969971
const val DATABASE_VERSION_0_59_4 = 213
970972
const val DATABASE_VERSION_0_60_4 = 214
971973
const val DATABASE_VERSION_0_61_5 = 225
972974
const val DATABASE_VERSION_0_62_3 = 227
973-
const val DATABASE_VERSION_0_63_3 = 228
975+
const val DATABASE_VERSION_0_63_3 = 228 // same up to 0.90.12
974976
const val SYNC_VERSION_0_59_4 = 29
975977
const val SYNC_VERSION_0_60_4 = 29
976978
const val SYNC_VERSION_0_62_3 = 31
977979
const val SYNC_VERSION_0_63_3 = 32
980+
const val SYNC_VERSION_0_90_12 = 33
978981

979982
const val DATABASE_VERSION = DATABASE_VERSION_0_63_3
980983
const val DATABASE_NAME = "Document.db"
981984

982985
// sync version is largely irrelevant
983-
const val SYNC_VERSION = SYNC_VERSION_0_63_3
984-
const val APP_VERSION = "0.63.3"
986+
const val SYNC_VERSION = SYNC_VERSION_0_90_12
987+
const val APP_VERSION = "0.90.12"
985988
}
986989
}
987990

app/src/main/kotlin/eu/fliegendewurst/triliumdroid/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class MainActivity : AppCompatActivity() {
334334
f.writeBytes(note.content!!)
335335
val contentUri = FileProvider.getUriForFile(
336336
this@MainActivity,
337-
"eu.fliegendewurst.fileprovider",
337+
applicationContext.packageName + ".provider",
338338
f.toFile()
339339
)
340340
clipData = ClipData.newRawUri("", contentUri)

app/src/main/kotlin/eu/fliegendewurst/triliumdroid/SetupActivity.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import androidx.preference.PreferenceManager
88
import eu.fliegendewurst.triliumdroid.databinding.ActivitySetupBinding
99

1010
class SetupActivity : AppCompatActivity() {
11+
companion object {
12+
private const val TAG: String = "SetupActivity"
13+
}
1114
private lateinit var binding: ActivitySetupBinding
1215
private lateinit var prefs: SharedPreferences
1316

@@ -20,7 +23,7 @@ class SetupActivity : AppCompatActivity() {
2023
binding.password.setText(
2124
prefs.getString(
2225
"password",
23-
"UNGHXdk0Ln22nDeIy98k4pDES9FBbrry8POEMMrkx4ovZLNyFGEDxCCE0yOHwP52riSTwCP5vhU7DbOkpdUOpelQJlJVwvA1u0k63pybca1yWBQFAFqEJ1NVT8iGDrIIdRmuVsod5v7gFQGRZCnxrtle3FHDUywufUNSROxrZfeT3gzqszsmn1yHFAJh6xqqSSKT6Ako9SqeDXmRIs8rfV8NmYom5Rur3TY4IlHxE2dKmldU9V7ii8vR9mNLHX4H"
26+
""
2427
)
2528
)
2629
}
@@ -52,7 +55,8 @@ class SetupActivity : AppCompatActivity() {
5255
handler.post {
5356
finish()
5457
}
55-
}, {
58+
}, { error ->
59+
Log.e(TAG, "failed to connect to server", error)
5660
// TODO
5761
})
5862
}

build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:8.1.2'
8+
classpath 'com.android.tools.build:gradle:8.7.3'
99
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
@@ -19,8 +19,4 @@ allprojects {
1919
mavenCentral()
2020
maven { url "https://a8c-libs.s3.amazonaws.com/android" }
2121
}
22-
}
23-
24-
task clean(type: Delete) {
25-
delete rootProject.buildDir
2622
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)