diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index a083225b7..7a1e7c030 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -17,8 +17,8 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
- distribution: "temurin"
- java-version: 11
+ distribution: 'temurin'
+ java-version: '17'
- name: Cache packages
id: cache-packages
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index f277755ba..f6ced2b5c 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -39,21 +39,18 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index fa856390d..8333c026e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -20,8 +20,8 @@ dependencies {
// Utils
implementation 'in.yuvi:http.fluent:1.3'
implementation 'com.google.code.gson:gson:2.8.5'
- implementation ("com.squareup.okhttp3:okhttp:$OKHTTP_VERSION"){
- force = true //API 19 support
+ implementation ("com.squareup.okhttp3:okhttp:$OKHTTP_VERSION!!"){
+ //force = true //API 19 support
}
implementation 'com.squareup.okio:okio:2.2.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
@@ -120,7 +120,7 @@ dependencies {
implementation "androidx.exifinterface:exifinterface:1.3.2"
implementation "androidx.core:core-ktx:$CORE_KTX_VERSION"
implementation "androidx.multidex:multidex:2.0.1"
- compile 'com.simplecityapps:recyclerview-fastscroll:2.0.1'
+ implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.1'
//swipe_layout
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
@@ -188,12 +188,16 @@ android {
vectorDrawables.useSupportLibrary = true
}
-
packagingOptions {
- exclude 'META-INF/androidx.*'
- exclude 'META-INF/proguard/androidx-annotations.pro'
+ jniLibs {
+ excludes += ['META-INF/androidx.*']
+ }
+ resources {
+ excludes += ['META-INF/androidx.*', 'META-INF/proguard/androidx-annotations.pro']
+ }
}
+
testOptions {
animationsDisabled true
@@ -326,11 +330,6 @@ android {
}
}
- lintOptions {
- disable 'MissingTranslation'
- disable 'ExtraTranslation'
- abortOnError false
- }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@@ -342,7 +341,11 @@ android {
buildFeatures {
viewBinding true
}
-
+ namespace 'fr.free.nrw.commons'
+ lint {
+ abortOnError false
+ disable 'MissingTranslation', 'ExtraTranslation'
+ }
}
String getTestUserName() {
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f564bb661..cee5fb81a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,7 +1,6 @@
+ xmlns:tools="http://schemas.android.com/tools">
diff --git a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java
index aa12816cc..ec4d0377a 100644
--- a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java
+++ b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java
@@ -41,8 +41,9 @@ import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.auth.SessionManager;
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
-import fr.free.nrw.commons.utils.DialogUtil;
import fr.free.nrw.commons.media.MediaClient;
+import fr.free.nrw.commons.profile.ProfileActivity;
+import fr.free.nrw.commons.utils.DialogUtil;
import fr.free.nrw.commons.utils.SystemThemeUtils;
import fr.free.nrw.commons.utils.ViewUtil;
import java.util.Locale;
@@ -52,7 +53,6 @@ import javax.inject.Inject;
import javax.inject.Named;
import org.apache.commons.lang3.StringUtils;
import org.wikipedia.dataclient.WikiSite;
-import fr.free.nrw.commons.profile.ProfileActivity;
/**
@@ -112,7 +112,8 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
private ContributionsListAdapter adapter;
- @Nullable private Callback callback;
+ @Nullable
+ private Callback callback;
private final int SPAN_COUNT_LANDSCAPE = 3;
private final int SPAN_COUNT_PORTRAIT = 1;
@@ -142,7 +143,8 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
@Override
- public void onCreate(@Nullable @org.jetbrains.annotations.Nullable final Bundle savedInstanceState) {
+ public void onCreate(
+ @Nullable @org.jetbrains.annotations.Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Now that we are allowing this fragment to be started for
// any userName- we expect it to be passed as an argument
@@ -336,7 +338,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
* Launch Custom Selector.
*/
@OnClick(R.id.fab_custom_gallery)
- void launchCustomSelector(){
+ void launchCustomSelector() {
controller.initiateCustomGalleryPickWithPermission(getActivity());
animateFAB(isFabOpen);
}
@@ -348,24 +350,24 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
private void animateFAB(final boolean isFabOpen) {
this.isFabOpen = !isFabOpen;
if (fabPlus.isShown()) {
- if (isFabOpen) {
- fabPlus.startAnimation(rotate_backward);
- fabCamera.startAnimation(fab_close);
- fabGallery.startAnimation(fab_close);
- fabCustomGallery.startAnimation(fab_close);
- fabCamera.hide();
- fabGallery.hide();
- fabCustomGallery.hide();
- } else {
- fabPlus.startAnimation(rotate_forward);
- fabCamera.startAnimation(fab_open);
- fabGallery.startAnimation(fab_open);
- fabCustomGallery.startAnimation(fab_open);
- fabCamera.show();
- fabGallery.show();
- fabCustomGallery.show();
- }
- this.isFabOpen = !isFabOpen;
+ if (isFabOpen) {
+ fabPlus.startAnimation(rotate_backward);
+ fabCamera.startAnimation(fab_close);
+ fabGallery.startAnimation(fab_close);
+ fabCustomGallery.startAnimation(fab_close);
+ fabCamera.hide();
+ fabGallery.hide();
+ fabCustomGallery.hide();
+ } else {
+ fabPlus.startAnimation(rotate_forward);
+ fabCamera.startAnimation(fab_open);
+ fabGallery.startAnimation(fab_open);
+ fabCustomGallery.startAnimation(fab_open);
+ fabCamera.show();
+ fabGallery.show();
+ fabCustomGallery.show();
+ }
+ this.isFabOpen = !isFabOpen;
}
}
diff --git a/app/src/main/java/fr/free/nrw/commons/filepicker/FilePicker.java b/app/src/main/java/fr/free/nrw/commons/filepicker/FilePicker.java
index 31ea06e0d..201aacb86 100644
--- a/app/src/main/java/fr/free/nrw/commons/filepicker/FilePicker.java
+++ b/app/src/main/java/fr/free/nrw/commons/filepicker/FilePicker.java
@@ -1,5 +1,7 @@
package fr.free.nrw.commons.filepicker;
+import static fr.free.nrw.commons.filepicker.PickedFiles.singleFileList;
+
import android.app.Activity;
import android.content.ClipData;
import android.content.Context;
@@ -8,13 +10,11 @@ import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
-import androidx.preference.PreferenceManager;
import android.provider.MediaStore;
import android.text.TextUtils;
-
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-
+import androidx.preference.PreferenceManager;
import fr.free.nrw.commons.customselector.model.Image;
import fr.free.nrw.commons.customselector.ui.selector.CustomSelectorActivity;
import java.io.File;
@@ -23,8 +23,6 @@ import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
-import static fr.free.nrw.commons.filepicker.PickedFiles.singleFileList;
-
public class FilePicker implements Constants {
private static final String KEY_PHOTO_URI = "photo_uri";
diff --git a/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java b/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java
index 9cacf7461..bb35b2f67 100644
--- a/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java
+++ b/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java
@@ -7,16 +7,13 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
-
import androidx.annotation.StringRes;
import androidx.core.content.ContextCompat;
-
import com.karumi.dexter.Dexter;
import com.karumi.dexter.MultiplePermissionsReport;
import com.karumi.dexter.PermissionToken;
import com.karumi.dexter.listener.PermissionRequest;
import com.karumi.dexter.listener.multi.MultiplePermissionsListener;
-
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.R;
import java.util.List;
diff --git a/app/src/main/res/values-b+be+tarask/error.xml b/app/src/main/res/values-b+be+x+old/error.xml
similarity index 100%
rename from app/src/main/res/values-b+be+tarask/error.xml
rename to app/src/main/res/values-b+be+x+old/error.xml
diff --git a/build.gradle b/build.gradle
index 25bb5ee0d..cff974b3e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,12 +2,11 @@
buildscript {
repositories {
google()
- jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
+ classpath 'com.android.tools.build:gradle:8.0.2'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath 'org.codehaus.groovy:groovy-all:2.4.15'
@@ -15,10 +14,11 @@ buildscript {
}
allprojects {
- repositories {
- google()
- jcenter()
- maven { url "https://jitpack.io" }
- maven { url "https://maven.google.com" }
- }
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal() // potential jcenter() replacement
+ maven { url "https://jitpack.io" }
+ maven { url "https://maven.google.com" }
+ }
}
diff --git a/data-client/build.gradle b/data-client/build.gradle
index 184480bd1..e8c732dc5 100644
--- a/data-client/build.gradle
+++ b/data-client/build.gradle
@@ -1,31 +1,38 @@
+// NOTE: This library is outdated, discontinued & will be replaced eventually.
+// Please refrain from altering the library contents unless necessary
+
+// Repository
+// url - 'https://github.com/wikimedia/wikimedia-android-data-client'
+// description - 'Android library for accessing the Wikimedia APIs.'
+
+// Licenses
+// name - 'The Apache Software License, Version 2.0'
+// url - 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+
+// Author
+// name - Dmitry Brant
+// email - me@dmitrybrant.com
+
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
- jcenter()
+ mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
- classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
-plugins {
- id "com.jfrog.bintray" version "1.7.3"
-}
-
allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
-
- apply plugin: 'com.github.dcendents.android-maven'
- apply plugin: 'com.jfrog.bintray'
}
version = "${VERSION_NAME}"
@@ -55,6 +62,7 @@ android {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
+ namespace 'org.wikipedia.dataclient'
}
dependencies {
@@ -82,67 +90,6 @@ dependencies {
testImplementation "commons-io:commons-io:2.6"
}
-task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- classifier = 'sources'
-}
-artifacts {
- archives sourcesJar
-}
-
-Properties properties = new Properties()
-if ( project.rootProject.file('local.properties').isFile() ) {
- properties.load(project.rootProject.file('local.properties').newDataInputStream())
-}
-
-bintray {
- user = properties.getProperty("bintray.user")
- key = properties.getProperty("bintray.apikey")
- println 'Bintray user: ' + user
- configurations = ['archives']
- pkg {
- repo = 'maven'
- name = "${ARTIFACT_ID}"
- vcsUrl = 'https://github.com/wikimedia/wikimedia-android-data-client.git'
- licenses = ['Apache-2.0']
- version {
- name = "${VERSION_NAME}"
- }
- publish = true
- }
-}
-
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
-
- name "${ARTIFACT_ID}"
- artifactId "${ARTIFACT_ID}"
- description 'Android library for accessing the Wikimedia APIs.'
- url 'https://github.com/wikimedia/wikimedia-android-data-client'
- inceptionYear '2019'
-
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- }
- }
- developers {
- developer {
- id 'dmitrybrant'
- name 'Dmitry Brant'
- email 'me@dmitrybrant.com'
- }
- }
- }
- }
- }
-}
-
repositories {
mavenCentral()
-}
+}
\ No newline at end of file
diff --git a/data-client/gradle/wrapper/gradle-wrapper.properties b/data-client/gradle/wrapper/gradle-wrapper.properties
index 2fe5b7b7b..2d9f959ad 100644
--- a/data-client/gradle/wrapper/gradle-wrapper.properties
+++ b/data-client/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Fri Jun 07 09:14:55 EDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
diff --git a/data-client/src/main/AndroidManifest.xml b/data-client/src/main/AndroidManifest.xml
index 327f221a1..057c28478 100644
--- a/data-client/src/main/AndroidManifest.xml
+++ b/data-client/src/main/AndroidManifest.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/gradle.properties b/gradle.properties
index 3ae0531d4..2e66784c6 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -14,7 +14,7 @@
# org.gradle.parallel=true
#Thu Mar 01 15:28:48 IST 2018
org.gradle.jvmargs=-Xmx1536M
-android.enableBuildCache=true
+org.gradle.caching=true
KOTLIN_VERSION=1.7.20
BUTTERKNIFE_VERSION=10.1.0
@@ -33,5 +33,7 @@ systemProp.http.proxyPort=0
systemProp.http.proxyHost=
android.useAndroidX=true
android.enableJetifier=true
-android.enableR8=false
-android.jetifier.blacklist=bcprov-jdk15on
\ No newline at end of file
+android.jetifier.ignorelist=bcprov-jdk15on
+android.defaults.buildfeatures.buildconfig=true
+android.nonTransitiveRClass=false
+android.nonFinalResIds=false
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0a47110a4..d2e417be9 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Dec 26 14:27:31 IST 2019
+#Sun Apr 23 18:22:54 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https://services.gradle.org/distributions/gradle-6.9-all.zip
+zipStorePath=wrapper/dists
\ No newline at end of file
diff --git a/jacoco.gradle b/jacoco.gradle
index 74adf0578..0998843b1 100644
--- a/jacoco.gradle
+++ b/jacoco.gradle
@@ -93,8 +93,12 @@ project.afterEvaluate {
description = "Generate Jacoco unified coverage reports for the ${variantName.capitalize()} build"
reports {
- html.enabled = true
- xml.enabled = true
+ html {
+ enabled true
+ }
+ xml {
+ enabled true
+ }
}
def javaClasses = fileTree(dir: variant.javaCompileProvider.get().destinationDir,
@@ -127,8 +131,12 @@ project.afterEvaluate {
description = "Generate Jacoco coverage reports for the ${variantName.capitalize()} build"
reports {
- html.enabled = true
- xml.enabled = true
+ html {
+ enabled true
+ }
+ xml {
+ enabled true
+ }
}
def javaClasses = fileTree(dir: variant.javaCompileProvider.get().destinationDir,