Skip to content

Commit

Permalink
Merge pull request #38 from SecUSo/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
udenr authored Jan 18, 2024
2 parents f680a0d + f45dd81 commit 2fec041
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 34 deletions.
52 changes: 34 additions & 18 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 @@ -19,10 +21,24 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
namespace 'org.secuso.privacyfriendlypaindiary'
lint {
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 @@ -33,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
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.secuso.privacyfriendlypaindiary">
xmlns:tools="http://schemas.android.com/tools">

<supports-screens
android:anyDensity="true"
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:7.2.1'
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
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
# org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx1536m
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 2fec041

Please sign in to comment.