Skip to content

Commit

Permalink
Update target sdk and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
udenr committed Jan 18, 2024
1 parent 61ee2f3 commit f45dd81
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 28 deletions.
49 changes: 32 additions & 17 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.devtools.ksp'
}

android {
compileSdkVersion 31

defaultConfig {
applicationId "org.secuso.privacyfriendlypaindiary"
minSdkVersion 21
targetSdkVersion 31
targetSdkVersion 34
compileSdk 34
versionCode 5
versionName "1.3.1"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand All @@ -24,6 +26,19 @@ android {
abortOnError false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

kotlin {
jvmToolchain(17)
}

android.applicationVariants.configureEach { variant ->
variant.outputs.all {
def appName = "pfa-pain-diary"
Expand All @@ -34,34 +49,34 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation('androidx.test.ext:junit:1.1.1') {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'junit:junit:4.13.2'
androidTestImplementation('androidx.test.ext:junit:1.1.5') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation('androidx.test:runner:1.5.2')
androidTestImplementation('androidx.test:core:1.5.0')
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'com.prolificinteractive:material-calendarview:1.4.3'
implementation("com.github.bumptech.glide:glide:4.6.1") {
implementation("com.github.bumptech.glide:glide:4.11.0") {
exclude group: "com.android.support"
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
ksp 'com.github.bumptech.glide:compiler:4.9.0'

implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"

def room_version = "2.4.2"
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
kapt "androidx.room:room-compiler:$room_version"
ksp "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation project(path: ':backup-api')
def work_version = "2.7.1"
def work_version = "2.9.0"
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.work:work-runtime-ktx:$work_version"
androidTestImplementation "androidx.work:work-testing:$work_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ class PFAPainDiaryApplication : Application(), Configuration.Provider {
BackupManager.backupRestorer = BackupRestorer()
}

override fun getWorkManagerConfiguration(): Configuration {
return Configuration.Builder().setMinimumLoggingLevel(Log.INFO).build()
}
override val workManagerConfiguration = Configuration.Builder().setMinimumLoggingLevel(Log.INFO).build()
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BackupRestorer : IBackupRestorer {
version
).writableDatabase
db.beginTransaction()
db.setVersion(version)
db.version = version
readDatabaseContent(reader, db)
db.setTransactionSuccessful()
db.endTransaction()
Expand All @@ -65,6 +65,7 @@ class BackupRestorer : IBackupRestorer {
name,
reader.nextBoolean()
)

"pref_reminder_time", "userID" -> prefEdit.putLong(name, reader.nextLong())
else -> throw RuntimeException("Unknown preference $name")
}
Expand All @@ -90,10 +91,12 @@ class BackupRestorer : IBackupRestorer {
reader,
pref
)

"preferences2" -> readPreferences(
reader,
pref2
)

else -> throw RuntimeException("Can not parse type $type")
}
}
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.7.0'
ext.kotlin_version = '1.9.10'
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id 'com.google.devtools.ksp' version "$kotlin_version-1.0.13" apply false
}

allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url "https://maven.google.com"
}
google()
}
}
Expand Down

0 comments on commit f45dd81

Please sign in to comment.