diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml new file mode 100644 index 0000000..75e0e90 --- /dev/null +++ b/.idea/appInsightsSettings.xml @@ -0,0 +1,45 @@ + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml new file mode 100644 index 0000000..0c0c338 --- /dev/null +++ b/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 4e3844e..0897082 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,18 +1,18 @@ + diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 88df0bd..c94868c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - - + diff --git a/.idea/modules.xml b/.idea/modules.xml index a1bccc5..cafb711 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -4,6 +4,9 @@ + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 96954dd..f007b07 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 31 - buildToolsVersion '28.0.3' + compileSdk 34 defaultConfig { applicationId "com.wismna.geoffroy.donext" - minSdkVersion 19 - targetSdkVersion 31 - versionCode 29 - versionName "1.8" + minSdkVersion 21 + targetSdkVersion 34 + versionCode 30 + versionName "1.9" javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] @@ -20,9 +19,13 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - zipAlignEnabled true } } + namespace 'com.wismna.geoffroy.donext' + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } } sonarqube { properties { @@ -36,29 +39,29 @@ sonarqube { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.3.1' - implementation 'com.google.android.material:material:1.5.0-alpha03' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.10.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.percentlayout:percentlayout:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.2.1' - implementation 'androidx.browser:browser:1.3.0' - implementation 'net.danlew:android.joda:2.9.7' - implementation 'androidx.constraintlayout:constraintlayout:2.1.0' - testImplementation 'junit:junit:4.12' + implementation 'androidx.recyclerview:recyclerview:1.3.2' + implementation 'androidx.browser:browser:1.7.0' + implementation 'net.danlew:android.joda:2.12.5' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' // App Center - def appCenterSdkVersion = '1.9.0' + def appCenterSdkVersion = '5.0.4' implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" // Room components - def roomVersion = "2.4.0-alpha04" + def roomVersion = "2.6.1" implementation "androidx.room:room-runtime:$roomVersion" annotationProcessor "androidx.room:room-compiler:$roomVersion" testImplementation "androidx.room:room-testing:$roomVersion" // Lifecycle components - def lifecycleVersion = '2.3.1' + def lifecycleVersion = '2.6.2' implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-livedata:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion" diff --git a/app/schemas/com.wismna.geoffroy.donext.data.AppDatabase/6.json b/app/schemas/com.wismna.geoffroy.donext.data.AppDatabase/6.json new file mode 100644 index 0000000..65a1260 --- /dev/null +++ b/app/schemas/com.wismna.geoffroy.donext.data.AppDatabase/6.json @@ -0,0 +1,171 @@ +{ + "formatVersion": 1, + "database": { + "version": 6, + "identityHash": "a911cf75d24949c0b24bd212cacc860c", + "entities": [ + { + "tableName": "tasks", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT, `description` TEXT, `cycle` INTEGER NOT NULL, `priority` INTEGER NOT NULL, `done` INTEGER NOT NULL, `deleted` INTEGER NOT NULL, `displayorder` INTEGER NOT NULL, `todayorder` INTEGER NOT NULL, `list` INTEGER NOT NULL, `duedate` TEXT, `todaydate` TEXT, FOREIGN KEY(`list`) REFERENCES `tasklist`(`_id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", + "fields": [ + { + "fieldPath": "_id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "description", + "columnName": "description", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "cycle", + "columnName": "cycle", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "priority", + "columnName": "priority", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "done", + "columnName": "done", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "deleted", + "columnName": "deleted", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "order", + "columnName": "displayorder", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "todayOrder", + "columnName": "todayorder", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "taskList", + "columnName": "list", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "dueDate", + "columnName": "duedate", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "todayDate", + "columnName": "todaydate", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [ + { + "name": "index_tasks_list", + "unique": false, + "columnNames": [ + "list" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `index_tasks_list` ON `${TABLE_NAME}` (`list`)" + } + ], + "foreignKeys": [ + { + "table": "tasklist", + "onDelete": "NO ACTION", + "onUpdate": "NO ACTION", + "columns": [ + "list" + ], + "referencedColumns": [ + "_id" + ] + } + ] + }, + { + "tableName": "tasklist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT, `visible` INTEGER NOT NULL, `displayorder` INTEGER NOT NULL, `taskCount` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "_id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "visible", + "columnName": "visible", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "order", + "columnName": "displayorder", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "taskCount", + "columnName": "taskCount", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [ + { + "viewName": "TodayTasksView", + "createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT * FROM tasks WHERE todaydate = date('now','localtime')" + } + ], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a911cf75d24949c0b24bd212cacc860c')" + ] + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 011b6e5..d22c56b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,14 +1,10 @@ - + diff --git a/app/src/main/java/com/wismna/geoffroy/donext/fragments/AboutDialogFragment.java b/app/src/main/java/com/wismna/geoffroy/donext/fragments/AboutDialogFragment.java index d326f53..de62800 100644 --- a/app/src/main/java/com/wismna/geoffroy/donext/fragments/AboutDialogFragment.java +++ b/app/src/main/java/com/wismna/geoffroy/donext/fragments/AboutDialogFragment.java @@ -1,5 +1,8 @@ package com.wismna.geoffroy.donext.fragments; +import android.content.Context; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; @@ -7,7 +10,6 @@ import androidx.annotation.Nullable; import android.view.View; import android.widget.TextView; -import com.wismna.geoffroy.donext.BuildConfig; import com.wismna.geoffroy.donext.R; /** @@ -30,9 +32,16 @@ public class AboutDialogFragment extends DynamicDialogFragment { public void onStart() { super.onStart(); - TextView versionDonext = findViewById(R.id.version_donext); Resources resources = getResources(); - versionDonext.setText(resources.getString(R.string.about_version_donext, BuildConfig.VERSION_NAME)); + try { + Context context = getContext(); + assert context != null; + PackageInfo pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); + TextView versionDonext = findViewById(R.id.version_donext); + versionDonext.setText(resources.getString(R.string.about_version_donext, pInfo.versionName)); + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } TextView versionAndroid = findViewById(R.id.version_android); versionAndroid.setText(resources.getString(R.string.about_version_android, Build.VERSION.SDK_INT)); diff --git a/build.gradle b/build.gradle index d28d618..6c0ca53 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { repositories { - jcenter() + mavenCentral() maven { url 'https://maven.google.com/' name 'Google' @@ -13,8 +13,8 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' - classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2' + classpath 'com.android.tools.build:gradle:8.2.0' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -23,12 +23,12 @@ buildscript { allprojects { repositories { - jcenter() + mavenCentral() google() } } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } diff --git a/gradle.properties b/gradle.properties index 915f0e6..5111fc0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,5 +16,6 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file +android.enableJetifier=false +android.useAndroidX=true +org.gradle.configuration-cache=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f80bbf..15de902 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists