mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
fixes #5208: gradle build fails with android studio flamingo update
This commit is contained in:
parent
9fb13395f6
commit
368701ec59
15 changed files with 105 additions and 150 deletions
15
.idea/codeStyles/Project.xml
generated
15
.idea/codeStyles/Project.xml
generated
|
|
@ -39,21 +39,18 @@
|
||||||
<option name="ALIGN_INIT_LIST_IN_COLUMNS" value="false" />
|
<option name="ALIGN_INIT_LIST_IN_COLUMNS" value="false" />
|
||||||
<option name="SPACE_BEFORE_SUPERCLASS_COLON" value="false" />
|
<option name="SPACE_BEFORE_SUPERCLASS_COLON" value="false" />
|
||||||
</Objective-C>
|
</Objective-C>
|
||||||
<Objective-C-extensions>
|
|
||||||
<extensions>
|
|
||||||
<pair source="cc" header="h" fileNamingConvention="NONE" />
|
|
||||||
<pair source="c" header="h" fileNamingConvention="NONE" />
|
|
||||||
</extensions>
|
|
||||||
</Objective-C-extensions>
|
|
||||||
<Python>
|
<Python>
|
||||||
<option name="USE_CONTINUATION_INDENT_FOR_ARGUMENTS" value="true" />
|
<option name="USE_CONTINUATION_INDENT_FOR_ARGUMENTS" value="true" />
|
||||||
</Python>
|
</Python>
|
||||||
<TypeScriptCodeStyleSettings>
|
<TypeScriptCodeStyleSettings>
|
||||||
<option name="INDENT_CHAINED_CALLS" value="false" />
|
<option name="INDENT_CHAINED_CALLS" value="false" />
|
||||||
</TypeScriptCodeStyleSettings>
|
</TypeScriptCodeStyleSettings>
|
||||||
<XML>
|
<files>
|
||||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
<extensions>
|
||||||
</XML>
|
<pair source="cc" header="h" fileNamingConvention="NONE" />
|
||||||
|
<pair source="c" header="h" fileNamingConvention="NONE" />
|
||||||
|
</extensions>
|
||||||
|
</files>
|
||||||
<codeStyleSettings language="CSS">
|
<codeStyleSettings language="CSS">
|
||||||
<indentOptions>
|
<indentOptions>
|
||||||
<option name="INDENT_SIZE" value="2" />
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ dependencies {
|
||||||
// Utils
|
// Utils
|
||||||
implementation 'in.yuvi:http.fluent:1.3'
|
implementation 'in.yuvi:http.fluent:1.3'
|
||||||
implementation 'com.google.code.gson:gson:2.8.5'
|
implementation 'com.google.code.gson:gson:2.8.5'
|
||||||
implementation ("com.squareup.okhttp3:okhttp:$OKHTTP_VERSION"){
|
implementation ("com.squareup.okhttp3:okhttp:$OKHTTP_VERSION!!"){
|
||||||
force = true //API 19 support
|
//force = true //API 19 support
|
||||||
}
|
}
|
||||||
implementation 'com.squareup.okio:okio:2.2.2'
|
implementation 'com.squareup.okio:okio:2.2.2'
|
||||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
|
||||||
|
|
@ -120,7 +120,7 @@ dependencies {
|
||||||
implementation "androidx.exifinterface:exifinterface:1.3.2"
|
implementation "androidx.exifinterface:exifinterface:1.3.2"
|
||||||
implementation "androidx.core:core-ktx:$CORE_KTX_VERSION"
|
implementation "androidx.core:core-ktx:$CORE_KTX_VERSION"
|
||||||
implementation "androidx.multidex:multidex:2.0.1"
|
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
|
//swipe_layout
|
||||||
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
|
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
|
||||||
|
|
@ -168,7 +168,7 @@ project.gradle.taskGraph.whenReady {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 31
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
//applicationId 'fr.free.nrw.commons'
|
//applicationId 'fr.free.nrw.commons'
|
||||||
|
|
@ -188,12 +188,16 @@ android {
|
||||||
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
exclude 'META-INF/androidx.*'
|
jniLibs {
|
||||||
exclude 'META-INF/proguard/androidx-annotations.pro'
|
excludes += ['META-INF/androidx.*']
|
||||||
|
}
|
||||||
|
resources {
|
||||||
|
excludes += ['META-INF/androidx.*', 'META-INF/proguard/androidx-annotations.pro']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
testOptions {
|
testOptions {
|
||||||
animationsDisabled true
|
animationsDisabled true
|
||||||
|
|
||||||
|
|
@ -245,6 +249,9 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
|
// resolutionStrategy {
|
||||||
|
// force 'androidx.annotation:annotation:1.1.0', 'com.jakewharton.timber:timber:4.7.1', 'androidx.fragment:fragment:1.3.6'
|
||||||
|
// }
|
||||||
resolutionStrategy.force 'androidx.annotation:annotation:1.1.0'
|
resolutionStrategy.force 'androidx.annotation:annotation:1.1.0'
|
||||||
resolutionStrategy.force 'com.jakewharton.timber:timber:4.7.1'
|
resolutionStrategy.force 'com.jakewharton.timber:timber:4.7.1'
|
||||||
resolutionStrategy.force 'androidx.fragment:fragment:1.3.6'
|
resolutionStrategy.force 'androidx.fragment:fragment:1.3.6'
|
||||||
|
|
@ -325,11 +332,6 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
|
||||||
disable 'MissingTranslation'
|
|
||||||
disable 'ExtraTranslation'
|
|
||||||
abortOnError false
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
|
@ -341,7 +343,11 @@ android {
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding true
|
viewBinding true
|
||||||
}
|
}
|
||||||
|
namespace 'fr.free.nrw.commons'
|
||||||
|
lint {
|
||||||
|
abortOnError false
|
||||||
|
disable 'MissingTranslation', 'ExtraTranslation'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getTestUserName() {
|
String getTestUserName() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
package="fr.free.nrw.commons">
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,9 @@ import fr.free.nrw.commons.R;
|
||||||
import fr.free.nrw.commons.Utils;
|
import fr.free.nrw.commons.Utils;
|
||||||
import fr.free.nrw.commons.auth.SessionManager;
|
import fr.free.nrw.commons.auth.SessionManager;
|
||||||
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
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.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.SystemThemeUtils;
|
||||||
import fr.free.nrw.commons.utils.ViewUtil;
|
import fr.free.nrw.commons.utils.ViewUtil;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
@ -47,7 +48,6 @@ import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.wikipedia.dataclient.WikiSite;
|
import org.wikipedia.dataclient.WikiSite;
|
||||||
import fr.free.nrw.commons.profile.ProfileActivity;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -107,7 +107,8 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
|
||||||
|
|
||||||
private ContributionsListAdapter adapter;
|
private ContributionsListAdapter adapter;
|
||||||
|
|
||||||
@Nullable private Callback callback;
|
@Nullable
|
||||||
|
private Callback callback;
|
||||||
|
|
||||||
private final int SPAN_COUNT_LANDSCAPE = 3;
|
private final int SPAN_COUNT_LANDSCAPE = 3;
|
||||||
private final int SPAN_COUNT_PORTRAIT = 1;
|
private final int SPAN_COUNT_PORTRAIT = 1;
|
||||||
|
|
@ -116,7 +117,8 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
|
||||||
String userName;
|
String userName;
|
||||||
|
|
||||||
@Override
|
@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);
|
super.onCreate(savedInstanceState);
|
||||||
//Now that we are allowing this fragment to be started for
|
//Now that we are allowing this fragment to be started for
|
||||||
// any userName- we expect it to be passed as an argument
|
// any userName- we expect it to be passed as an argument
|
||||||
|
|
@ -310,7 +312,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
|
||||||
* Launch Custom Selector.
|
* Launch Custom Selector.
|
||||||
*/
|
*/
|
||||||
@OnClick(R.id.fab_custom_gallery)
|
@OnClick(R.id.fab_custom_gallery)
|
||||||
void launchCustomSelector(){
|
void launchCustomSelector() {
|
||||||
controller.initiateCustomGalleryPickWithPermission(getActivity());
|
controller.initiateCustomGalleryPickWithPermission(getActivity());
|
||||||
animateFAB(isFabOpen);
|
animateFAB(isFabOpen);
|
||||||
}
|
}
|
||||||
|
|
@ -322,24 +324,24 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
|
||||||
private void animateFAB(final boolean isFabOpen) {
|
private void animateFAB(final boolean isFabOpen) {
|
||||||
this.isFabOpen = !isFabOpen;
|
this.isFabOpen = !isFabOpen;
|
||||||
if (fabPlus.isShown()) {
|
if (fabPlus.isShown()) {
|
||||||
if (isFabOpen) {
|
if (isFabOpen) {
|
||||||
fabPlus.startAnimation(rotate_backward);
|
fabPlus.startAnimation(rotate_backward);
|
||||||
fabCamera.startAnimation(fab_close);
|
fabCamera.startAnimation(fab_close);
|
||||||
fabGallery.startAnimation(fab_close);
|
fabGallery.startAnimation(fab_close);
|
||||||
fabCustomGallery.startAnimation(fab_close);
|
fabCustomGallery.startAnimation(fab_close);
|
||||||
fabCamera.hide();
|
fabCamera.hide();
|
||||||
fabGallery.hide();
|
fabGallery.hide();
|
||||||
fabCustomGallery.hide();
|
fabCustomGallery.hide();
|
||||||
} else {
|
} else {
|
||||||
fabPlus.startAnimation(rotate_forward);
|
fabPlus.startAnimation(rotate_forward);
|
||||||
fabCamera.startAnimation(fab_open);
|
fabCamera.startAnimation(fab_open);
|
||||||
fabGallery.startAnimation(fab_open);
|
fabGallery.startAnimation(fab_open);
|
||||||
fabCustomGallery.startAnimation(fab_open);
|
fabCustomGallery.startAnimation(fab_open);
|
||||||
fabCamera.show();
|
fabCamera.show();
|
||||||
fabGallery.show();
|
fabGallery.show();
|
||||||
fabCustomGallery.show();
|
fabCustomGallery.show();
|
||||||
}
|
}
|
||||||
this.isFabOpen = !isFabOpen;
|
this.isFabOpen = !isFabOpen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ open class OnSwipeTouchListener(context: Context?) : View.OnTouchListener {
|
||||||
private val SWIPE_THRESHOLD_WIDTH = (getScreenResolution(context!!)).first / 3
|
private val SWIPE_THRESHOLD_WIDTH = (getScreenResolution(context!!)).first / 3
|
||||||
private val SWIPE_VELOCITY_THRESHOLD = 1000
|
private val SWIPE_VELOCITY_THRESHOLD = 1000
|
||||||
|
|
||||||
override fun onTouch(view: View?, motionEvent: MotionEvent?): Boolean {
|
override fun onTouch(view: View?, motionEvent: MotionEvent): Boolean {
|
||||||
return gestureDetector.onTouchEvent(motionEvent)
|
return gestureDetector.onTouchEvent(motionEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ open class OnSwipeTouchListener(context: Context?) : View.OnTouchListener {
|
||||||
|
|
||||||
inner class GestureListener : GestureDetector.SimpleOnGestureListener() {
|
inner class GestureListener : GestureDetector.SimpleOnGestureListener() {
|
||||||
|
|
||||||
override fun onDown(e: MotionEvent?): Boolean {
|
override fun onDown(e: MotionEvent): Boolean {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package fr.free.nrw.commons.filepicker;
|
package fr.free.nrw.commons.filepicker;
|
||||||
|
|
||||||
|
import static fr.free.nrw.commons.filepicker.PickedFiles.singleFileList;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
@ -8,13 +10,11 @@ import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import androidx.preference.PreferenceManager;
|
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.preference.PreferenceManager;
|
||||||
import fr.free.nrw.commons.customselector.model.Image;
|
import fr.free.nrw.commons.customselector.model.Image;
|
||||||
import fr.free.nrw.commons.customselector.ui.selector.CustomSelectorActivity;
|
import fr.free.nrw.commons.customselector.ui.selector.CustomSelectorActivity;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
@ -23,8 +23,6 @@ import java.net.URISyntaxException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static fr.free.nrw.commons.filepicker.PickedFiles.singleFileList;
|
|
||||||
|
|
||||||
public class FilePicker implements Constants {
|
public class FilePicker implements Constants {
|
||||||
|
|
||||||
private static final String KEY_PHOTO_URI = "photo_uri";
|
private static final String KEY_PHOTO_URI = "photo_uri";
|
||||||
|
|
|
||||||
|
|
@ -5,17 +5,14 @@ import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.karumi.dexter.Dexter;
|
import com.karumi.dexter.Dexter;
|
||||||
import com.karumi.dexter.PermissionToken;
|
import com.karumi.dexter.PermissionToken;
|
||||||
import com.karumi.dexter.listener.PermissionDeniedResponse;
|
import com.karumi.dexter.listener.PermissionDeniedResponse;
|
||||||
import com.karumi.dexter.listener.PermissionGrantedResponse;
|
import com.karumi.dexter.listener.PermissionGrantedResponse;
|
||||||
import com.karumi.dexter.listener.PermissionRequest;
|
import com.karumi.dexter.listener.PermissionRequest;
|
||||||
import com.karumi.dexter.listener.single.BasePermissionListener;
|
import com.karumi.dexter.listener.single.BasePermissionListener;
|
||||||
|
|
||||||
import fr.free.nrw.commons.CommonsApplication;
|
import fr.free.nrw.commons.CommonsApplication;
|
||||||
import fr.free.nrw.commons.R;
|
import fr.free.nrw.commons.R;
|
||||||
|
|
||||||
|
|
|
||||||
16
build.gradle
16
build.gradle
|
|
@ -2,12 +2,11 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://plugins.gradle.org/m2/" }
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
classpath 'com.android.tools.build:gradle:8.0.0'
|
||||||
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
|
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
|
||||||
classpath 'org.codehaus.groovy:groovy-all:2.4.15'
|
classpath 'org.codehaus.groovy:groovy-all:2.4.15'
|
||||||
|
|
@ -15,10 +14,11 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
gradlePluginPortal() // potential jcenter() replacement
|
||||||
maven { url "https://maven.google.com" }
|
maven { url "https://jitpack.io" }
|
||||||
}
|
maven { url "https://maven.google.com" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,45 @@
|
||||||
|
// 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 {
|
buildscript {
|
||||||
ext.kotlin_version = '1.7.20'
|
ext.kotlin_version = '1.7.20'
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
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"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
|
||||||
id "com.jfrog.bintray" version "1.7.3"
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
|
||||||
apply plugin: 'com.jfrog.bintray'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "${VERSION_NAME}"
|
version = "${VERSION_NAME}"
|
||||||
group = "${GROUP_ID}"
|
group = "${GROUP_ID}"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 31
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
|
|
@ -55,6 +62,7 @@ android {
|
||||||
sourceCompatibility = '1.8'
|
sourceCompatibility = '1.8'
|
||||||
targetCompatibility = '1.8'
|
targetCompatibility = '1.8'
|
||||||
}
|
}
|
||||||
|
namespace 'org.wikipedia.dataclient'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
@ -82,67 +90,6 @@ dependencies {
|
||||||
testImplementation "commons-io:commons-io:2.6"
|
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 {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#Fri Jun 07 09:14:55 EDT 2019
|
#Fri Jun 07 09:14:55 EDT 2019
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.wikipedia.dataclient">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<application android:allowBackup="true" android:label="@string/app_name" android:supportsRtl="true">
|
<application android:allowBackup="true" android:label="@string/app_name" android:supportsRtl="true">
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
#Thu Mar 01 15:28:48 IST 2018
|
#Thu Mar 01 15:28:48 IST 2018
|
||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
android.enableBuildCache=true
|
|
||||||
|
|
||||||
KOTLIN_VERSION=1.7.20
|
KOTLIN_VERSION=1.7.20
|
||||||
BUTTERKNIFE_VERSION=10.1.0
|
BUTTERKNIFE_VERSION=10.1.0
|
||||||
|
|
@ -33,5 +32,7 @@ systemProp.http.proxyPort=0
|
||||||
systemProp.http.proxyHost=
|
systemProp.http.proxyHost=
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.enableR8=false
|
android.jetifier.ignorelist=bcprov-jdk15on
|
||||||
android.jetifier.blacklist=bcprov-jdk15on
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
android.nonFinalResIds=false
|
||||||
6
gradle/wrapper/gradle-wrapper.properties
vendored
6
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
#Thu Dec 26 14:27:31 IST 2019
|
#Sun Apr 23 18:22:54 IST 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https://services.gradle.org/distributions/gradle-6.9-all.zip
|
|
||||||
|
|
@ -93,8 +93,12 @@ project.afterEvaluate {
|
||||||
description = "Generate Jacoco unified coverage reports for the ${variantName.capitalize()} build"
|
description = "Generate Jacoco unified coverage reports for the ${variantName.capitalize()} build"
|
||||||
|
|
||||||
reports {
|
reports {
|
||||||
html.enabled = true
|
html {
|
||||||
xml.enabled = true
|
enabled true
|
||||||
|
}
|
||||||
|
xml {
|
||||||
|
enabled true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def javaClasses = fileTree(dir: variant.javaCompileProvider.get().destinationDir,
|
def javaClasses = fileTree(dir: variant.javaCompileProvider.get().destinationDir,
|
||||||
|
|
@ -127,8 +131,12 @@ project.afterEvaluate {
|
||||||
description = "Generate Jacoco coverage reports for the ${variantName.capitalize()} build"
|
description = "Generate Jacoco coverage reports for the ${variantName.capitalize()} build"
|
||||||
|
|
||||||
reports {
|
reports {
|
||||||
html.enabled = true
|
html {
|
||||||
xml.enabled = true
|
enabled true
|
||||||
|
}
|
||||||
|
xml {
|
||||||
|
enabled true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def javaClasses = fileTree(dir: variant.javaCompileProvider.get().destinationDir,
|
def javaClasses = fileTree(dir: variant.javaCompileProvider.get().destinationDir,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue