Skip to content

Commit

Permalink
Update Gradle plugin
Browse files Browse the repository at this point in the history
- to 7.5.1
- fix some deprecations from AGP upgrade
- use short name compileSdk as for min/targetSdk
- set compileSdk same to targetSdk
- remove some outdated comments
- remove unused build repo source
- add project repo source mavenCentral, let jcenter for locus
  • Loading branch information
bekuno authored Feb 20, 2023
1 parent 2adcdc5 commit 70cbcd4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
26 changes: 17 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
buildscript {
repositories {
jcenter()
google()
}
// these dependencies are used by gradle plugins, not by the project
dependencies {
// Android gradle plugin
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:7.4.1'
}
}

Expand All @@ -18,6 +17,8 @@ plugins {
allprojects {
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
// jcenter only for old locus-api-android
jcenter()
google()
}
Expand All @@ -26,10 +27,13 @@ allprojects {
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
namespace 'menion.android.whereyougo'

compileSdk 31

defaultConfig {
applicationId "menion.android.whereyougo"

minSdk 21
//noinspection OldTargetApi
targetSdk 31
Expand All @@ -40,7 +44,7 @@ android {
// include only those language resources from libraries that we actively maintain ourselves in the translation project
// when changed here - also change in array.xml/strings_pref_languages.xml is necessary
// not yet enough strings translated (>40%): "sl","sv"
resConfigs "en","ar","ca","cs","da","de", "el","es","fi","fr","hu","it","ja","ko","nb","nl","pl","pt-rBR","pt-rPT","ru","sk","tr"
resConfigs 'en', 'ar', 'ca', 'cs', 'da', 'de', 'el', 'es', 'fi', 'fr', 'hu', 'it', 'ja', 'ko', 'nb', 'nl', 'pl', 'pt-rBR', 'pt-rPT', 'ru', 'sk', 'tr'
}

// define ndk version to use local the same version as on CI
Expand Down Expand Up @@ -70,14 +74,19 @@ android {
}
}

lintOptions {
lint {
abortOnError false
checkReleaseBuilds false
}

packagingOptions {
// exclude ARMEABI native so file, ARMEABI has been removed in NDK r17.
exclude "lib/armeabi/**"
// exclude ARMEABI native so file, ARMEABI has been removed in NDK r17
jniLibs {
excludes += ['lib/armeabi/**']
}
resources {
excludes += ['lib/armeabi/**']
}
}

// special version code for nightly and rc builds
Expand All @@ -87,7 +96,6 @@ android {
setVersionCodeOverride(versionCodeFromDate(10000000))
}
}
// debug and release builds have offset zero, no special handling here
}
}

Expand Down Expand Up @@ -122,7 +130,7 @@ dependencies {
//noinspection GradleDependency
implementation 'com.google.zxing:core:3.3.0'

// Okhttp network access. 3.12.x is API level < 21, 3.13 or better requires API 21
// Okhttp network access
implementation 'com.squareup.okhttp3:okhttp:4.10.0'

// ani gif support
Expand Down
1 change: 0 additions & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="menion.android.whereyougo"
android:installLocation="auto">

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Expand Down

0 comments on commit 70cbcd4

Please sign in to comment.