Skip to content

Commit

Permalink
Upgrade to Gradle 8 (#19)
Browse files Browse the repository at this point in the history
* Upgrade to Gradle 8

* Fix of some warnings and code smells
  • Loading branch information
MoeLa authored Nov 26, 2023
1 parent 06a33e5 commit 97eaa51
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 24 deletions.
16 changes: 16 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ After having set up the crawler, you start the crafting, put your mobile aside f
7. Open Dominations. Ensure, that Dominations runs on the same language as the Museum Crawler. If not, change either's language.
8. Switch into the Museum's Artifact Crafting screen. You should now see the button to start crafting five artifacts for 475 fragments and of course our red overlay icon.
Note: If the first craft is cheaper (since you've researched that skill in the Library), you have to tap that button manually before continuing to the next step.
8. Tap the red overlay icon. It should turn green and start crafting. Every item is sold directly. After the five items, 475 fragments are spent again to craft another round of artifacts.
9. Stop the process any time by pressing the green overlay icon. It should turn back to red.
9. Tap the red overlay icon. It should turn green and start crafting. Every item is sold directly. After the five items, 475 fragments are spent again to craft another round of artifacts.
10. Stop the process any time by pressing the green overlay icon. It should turn back to red.

### Second steps

Expand Down
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'

android {
compileSdk 33
compileSdk 34

buildFeatures {
dataBinding true
Expand Down Expand Up @@ -42,12 +42,12 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:19.0.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.10.0'
implementation 'com.google.guava:guava:29.0-android'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'androidx.activity:activity:1.6.0'
implementation 'androidx.fragment:fragment:1.5.7'
implementation 'androidx.activity:activity:1.8.1'
implementation 'androidx.fragment:fragment:1.6.2'
implementation 'org.bitbucket.cowwoc:diff-match-patch:1.2'
implementation 'com.zeugmasolutions.localehelper:locale-helper-android:1.5.1'
implementation 'net.steamcrafted:materialiconlib:1.1.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class KeepRulesAdapter extends RecyclerView.Adapter<KeepRulesAdapter.ViewHolder> {

private Context context;
private List<KeepRule> keepRules;
private final List<KeepRule> keepRules;

public KeepRulesAdapter(List<KeepRule> keepRules) {
this.keepRules = keepRules;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/bhg/sucks/model/KeepThreeStarOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public enum KeepThreeStarOption {
OnlyFoodGold,
Yes;

public static String SHARED_PREF_KEY = KeepThreeStarOption.class.getName();
public static final String SHARED_PREF_KEY = KeepThreeStarOption.class.getName();

}
12 changes: 4 additions & 8 deletions app/src/main/java/bhg/sucks/service/util/ContextUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.Locale;

/**
* Taken from https://lokalise.com/blog/android-app-localization/#Change_Application_Locale_Programmatically
* Taken from <a href="https://lokalise.com/blog/android-app-localization/#Change_Application_Locale_Programmatically">...</a>
*/
public class ContextUtils extends ContextWrapper {

Expand All @@ -22,13 +22,9 @@ public static ContextUtils updateLocale(Context context, Locale localeToSwitchTo
Resources resources = context.getResources();
Configuration configuration = resources.getConfiguration(); // 1

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
LocaleList localeList = new LocaleList(localeToSwitchTo); // 2
LocaleList.setDefault(localeList); // 3
configuration.setLocales(localeList); // 4
} else {
configuration.locale = localeToSwitchTo; // 5
}
LocaleList localeList = new LocaleList(localeToSwitchTo); // 2
LocaleList.setDefault(localeList); // 3
configuration.setLocales(localeList); // 4

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
context = context.createConfigurationContext(configuration); // 6
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_flag_of_germany.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1000dp"
android:height="600dp"
android:width="100dp"
android:height="60dp"
android:viewportWidth="5"
android:viewportHeight="3">
<path
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
<string name="sell_button_prefix">Verkaufen für</string>
<string name="confirm_button_text">Ja</string>
<string name="continue_button_text">Fortfahren</string>
<string name="exit">Beenden</string>
<string name="debug_mode">Debug-Modus</string>
<string name="mandatory_skills">Pflichteigenschaften</string>
<string name="optional_skills">Optionale Eigenschaften</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<string name="category">Category</string>
<string name="delete_rule">Delete Rule</string>
<string name="edit_rule">Edit Rule</string>
<string name="exit">Exit</string>
<string name="id">Id</string>
<string name="keep_3_artifacts">Keep 3* artifacts</string>
<string name="name">Name</string>
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ buildscript {
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.1.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ org.gradle.jvmargs=-Xmx2048m
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
org.gradle.unsafe.configuration-cache=true
org.gradle.unsafe.configuration-cache=true
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
Expand Up @@ -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-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip

0 comments on commit 97eaa51

Please sign in to comment.