From 0539bf6060bd71465aa7e1a5be0dafd602b52e2e Mon Sep 17 00:00:00 2001 From: Louis Hildebrand Date: Fri, 18 Oct 2024 15:04:52 -0400 Subject: [PATCH 01/24] Replace jcenter() with mavenCentral() JCenter is no longer available. --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e2cce33..296f05f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { repositories { - jcenter() + mavenCentral() google() } dependencies { @@ -17,7 +17,7 @@ buildscript { allprojects { repositories { - jcenter() + mavenCentral() maven { url "https://jitpack.io" } google() From a73b6411404b752f4e503d94190a0d7869d22429 Mon Sep 17 00:00:00 2001 From: Louis Hildebrand Date: Fri, 18 Oct 2024 15:17:54 -0400 Subject: [PATCH 02/24] Upgrade to newer versions of Gradle, etc. Use the same versions as what I got working for the vintage-chroma dependency for convenience. --- app/build.gradle | 2 +- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1b5b2ae..8a20055 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,7 @@ android { } } compileSdkVersion 33 - buildToolsVersion '28.0.3' + buildToolsVersion '29.0.2' defaultConfig { applicationId "com.aricneto.twistytimer" minSdkVersion 16 diff --git a/build.gradle b/build.gradle index 296f05f..eeea203 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath ('com.android.tools.build:gradle:3.5.1') { + classpath ('com.android.tools.build:gradle:4.0.0') { force = true } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 969aeba..c378967 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip From 95dad972ce98e836f0e26081e1cf8782533f17ac Mon Sep 17 00:00:00 2001 From: Louis Hildebrand Date: Fri, 18 Oct 2024 16:56:44 -0400 Subject: [PATCH 03/24] Add vintage-chroma dependency as subproject The dependency com.pavelsikun:vintage-chroma:1.5 is no longer available. As a workaround, make a git submodule from the vintage-chroma repo and add it as a subproject in Gradle. --- .gitmodules | 3 +++ app/build.gradle | 6 +++-- .../aricneto/twistify/ApplicationTest.java | 23 +++++++++++-------- .../activity/SettingsActivity.java | 6 ++++- app/src/main/res/values/styles.xml | 2 +- build.gradle | 5 ++-- lib/vintage-chroma | 1 + settings.gradle | 1 + 8 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 .gitmodules create mode 160000 lib/vintage-chroma diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a3ee44e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/vintage-chroma"] + path = lib/vintage-chroma + url = https://github.com/louis-hildebrand/VintageChroma.git diff --git a/app/build.gradle b/app/build.gradle index 8a20055..5acbb8e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,7 +56,9 @@ dependencies { implementation 'androidx.percentlayout:percentlayout:1.0.0' implementation "androidx.annotation:annotation:1.1.0" implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3' - implementation 'com.takisoft.fix:preference-v7:26.0.1.0' + implementation 'androidx.preference:preference:1.2.1' + // TODO: Replace this one too? +// implementation 'com.takisoft.fix:preference-v7:26.0.1.0' implementation 'com.android.support:multidex:1.0.3' // Butterknife ("apt" dependency is defined in root "build.gradle" script). implementation 'com.jakewharton:butterknife:10.0.0' @@ -87,7 +89,7 @@ dependencies { // Inapp Billing implementation 'com.anjlab.android.iab.v3:library:2.0.3' // Material color picker - implementation 'com.pavelsikun:vintage-chroma:1.5' + implementation project(':lib:vintage-chroma:library') testImplementation 'junit:junit:4.12' } diff --git a/app/src/androidTest/java/com/aricneto/twistify/ApplicationTest.java b/app/src/androidTest/java/com/aricneto/twistify/ApplicationTest.java index 2736dbc..233610c 100644 --- a/app/src/androidTest/java/com/aricneto/twistify/ApplicationTest.java +++ b/app/src/androidTest/java/com/aricneto/twistify/ApplicationTest.java @@ -1,13 +1,18 @@ package com.aricneto.twistify; import android.app.Application; -import android.test.ApplicationTestCase; +// TODO: compiler says android.test does not exist +// Adding dependency androidTestImplementation 'com.google.android:android-test:4.1.1.4' in build.gradle +// seems to solve that issue, but then causes others... +//import android.test.ApplicationTestCase; +// +///** +// * Testing Fundamentals +// */ +//public class ApplicationTest extends ApplicationTestCase { +// public ApplicationTest() { +// super(Application.class); +// } +//} -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file +public class ApplicationTest {} \ No newline at end of file diff --git a/app/src/main/java/com/aricneto/twistytimer/activity/SettingsActivity.java b/app/src/main/java/com/aricneto/twistytimer/activity/SettingsActivity.java index befc37d..b36c2ec 100644 --- a/app/src/main/java/com/aricneto/twistytimer/activity/SettingsActivity.java +++ b/app/src/main/java/com/aricneto/twistytimer/activity/SettingsActivity.java @@ -36,7 +36,7 @@ import com.aricneto.twistytimer.utils.LocaleUtils; import com.aricneto.twistytimer.utils.Prefs; import com.aricneto.twistytimer.utils.ThemeUtils; -import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat; +import androidx.preference.PreferenceFragmentCompat; import java.lang.ref.PhantomReference; import java.util.function.Function; @@ -331,6 +331,10 @@ public void onCreate(@Nullable Bundle savedInstanceState) { } @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { + // TODO: what to do here? + } + public void onCreatePreferencesFix(Bundle bundle, String rootKey) { setPreferencesFromResource(R.xml.prefs, rootKey); diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ea2b9b3..f5e8a3a 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -122,7 +122,7 @@ #0062ff -