mirror of
https://github.com/MatomoCamp/matomocamp-companion-android.git
synced 2024-09-19 16:13:46 +02:00
update Gradle plugin, various libraries and change compileSdkVersion to 33
This commit is contained in:
parent
53d9d5e60a
commit
016a768d05
8 changed files with 25 additions and 24 deletions
|
@ -11,7 +11,7 @@ install:
|
|||
# Download latest Android command line tools if not already in cache and replace the previous ones, if any
|
||||
- if test ! -e $ANDROID_SDK_ROOT/$COMMAND_LINE_TOOLS_ARCHIVE ; then rm -rf $ANDROID_SDK_ROOT && mkdir -p $ANDROID_SDK_ROOT && curl https://dl.google.com/android/repository/$COMMAND_LINE_TOOLS_ARCHIVE -o $ANDROID_SDK_ROOT/$COMMAND_LINE_TOOLS_ARCHIVE && unzip -qq -n $ANDROID_SDK_ROOT/$COMMAND_LINE_TOOLS_ARCHIVE -d $ANDROID_SDK_ROOT ; fi
|
||||
# Install or update Android SDK components (no-op if already up-to-date and cached)
|
||||
- echo y | $ANDROID_SDK_ROOT/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT 'platforms;android-32' 'build-tools;32.0.0' > /dev/null
|
||||
- echo y | $ANDROID_SDK_ROOT/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT 'platforms;android-33' 'build-tools;33.0.0' > /dev/null
|
||||
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
|
|
|
@ -7,8 +7,9 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
buildToolsVersion "32.0.0"
|
||||
namespace 'be.digitalia.fosdem'
|
||||
compileSdkVersion 33
|
||||
buildToolsVersion "33.0.0"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "be.digitalia.fosdem"
|
||||
|
@ -103,21 +104,21 @@ dependencies {
|
|||
def room_version = "2.4.3"
|
||||
def okhttp_version = "3.12.13"
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
|
||||
|
||||
implementation "androidx.multidex:multidex:2.0.1"
|
||||
implementation "com.google.dagger:hilt-android:$hilt_version"
|
||||
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
|
||||
implementation 'androidx.core:core-ktx:1.8.0'
|
||||
implementation 'androidx.activity:activity-ktx:1.5.1'
|
||||
implementation 'androidx.fragment:fragment-ktx:1.5.2'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.0'
|
||||
implementation 'androidx.core:core-ktx:1.9.0'
|
||||
implementation 'androidx.activity:activity-ktx:1.6.0'
|
||||
implementation 'androidx.fragment:fragment-ktx:1.5.3'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
|
||||
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
|
||||
implementation 'androidx.drawerlayout:drawerlayout:1.2.0-alpha01'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
implementation 'androidx.browser:browser:1.4.0'
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
|
||||
|
@ -132,6 +133,6 @@ dependencies {
|
|||
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
|
||||
}
|
||||
implementation 'com.squareup.okio:okio:3.2.0'
|
||||
implementation 'com.squareup.moshi:moshi:1.13.0'
|
||||
implementation 'com.squareup.moshi:moshi:1.14.0'
|
||||
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
||||
}
|
||||
|
|
|
@ -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="be.digitalia.fosdem"
|
||||
android:installLocation="auto"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.graphics.drawable.Animatable
|
|||
import android.net.Uri
|
||||
import android.nfc.NdefRecord
|
||||
import android.os.Bundle
|
||||
import android.view.KeyEvent
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
|
@ -240,14 +241,14 @@ class MainActivity : AppCompatActivity(R.layout.main), CreateNfcAppDataCallback
|
|||
}
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
with(holder) {
|
||||
if (drawerLayout.isDrawerOpen(navigationView)) {
|
||||
drawerLayout.closeDrawer(navigationView)
|
||||
} else {
|
||||
super.onBackPressed()
|
||||
}
|
||||
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
|
||||
// Allow software back press to be properly dispatched to drawer layout
|
||||
val handled = when (event.action) {
|
||||
KeyEvent.ACTION_DOWN -> holder.drawerLayout.onKeyDown(event.keyCode, event)
|
||||
KeyEvent.ACTION_UP -> holder.drawerLayout.onKeyUp(event.keyCode, event)
|
||||
else -> false
|
||||
}
|
||||
return handled || super.dispatchKeyEvent(event)
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
|
|
|
@ -86,7 +86,7 @@ class SearchResultActivity : AppCompatActivity(R.layout.search_result) {
|
|||
}
|
||||
|
||||
override fun onSupportNavigateUp(): Boolean {
|
||||
onBackPressed()
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ class SettingsActivity : SimpleToolbarActivity() {
|
|||
}
|
||||
|
||||
override fun onSupportNavigateUp(): Boolean {
|
||||
onBackPressed()
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
super.onBackPressed()
|
||||
override fun finish() {
|
||||
super.finish()
|
||||
overridePendingTransition(R.anim.partial_zoom_in, R.anim.slide_out_right)
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.2.2'
|
||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
|
||||
}
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -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.3.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
|
|
Loading…
Reference in a new issue