From 2293991a46b341f4be7b2565f3c3d95d4dc4bf89 Mon Sep 17 00:00:00 2001 From: Christopher Beckmann Date: Thu, 29 Oct 2020 10:54:14 +0100 Subject: [PATCH] Upgrade Gradle to v6.5 Fixed #61 for API > 16 (Hotfix) - need rework of the GameField to make it work on API 16 for RTL locale as well. --- app/build.gradle | 5 ++--- .../privacyfriendlysudoku/ui/view/SudokuFieldLayout.java | 5 +++++ build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8c6e0d9..1103e7e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,7 +34,7 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.preference:preference:1.1.1' - testImplementation 'junit:junit:4.12' + testImplementation 'junit:junit:4.13.1' implementation 'androidx.core:core:1.3.2' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v13:1.0.0' @@ -42,6 +42,5 @@ dependencies { implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.legacy:legacy-support-core-ui:1.0.0' implementation 'androidx.legacy:legacy-support-core-utils:1.0.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.1' - + implementation 'androidx.constraintlayout:constraintlayout:2.0.3' } diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuFieldLayout.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuFieldLayout.java index 9d78d98..2a497d0 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuFieldLayout.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuFieldLayout.java @@ -23,6 +23,7 @@ import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; +import android.os.Build; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; @@ -83,6 +84,10 @@ public class SudokuFieldLayout extends RelativeLayout implements IHighlightChang sectionLineColor = a.getColor(R.styleable.SudokuFieldLayout_sudokuFieldSectionLineColor, Color.BLACK); a.recycle(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + setLayoutDirection(LAYOUT_DIRECTION_LTR); + } + setWillNotDraw(false); setBackgroundColor(backgroundColor); } diff --git a/build.gradle b/build.gradle index a6ad490..017511d 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.1' + classpath 'com.android.tools.build:gradle:4.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 177ea3b..d98efc6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Oct 06 10:50:26 CEST 2020 +#Thu Oct 29 10:00:13 CET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip