Skip to content

Commit

Permalink
chore: migrate to version catalog, upgrade core and maps module depen…
Browse files Browse the repository at this point in the history
…dencies
  • Loading branch information
sgrimault committed Oct 20, 2024
1 parent acaa949 commit eb43c02
Show file tree
Hide file tree
Showing 25 changed files with 219 additions and 106 deletions.
3 changes: 2 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 10 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,46 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.klint_version = '11.3.1'
ext.kotlin_version = '1.8.0'
ext.androidx_hilt_version = '1.0.0'
ext.hilt_version = '2.44'
ext.retrofit_version = '2.9.0'
ext.room_version = '2.5.1'
ext.tinylog_version = '2.4.1'

repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

plugins {
id 'com.google.dagger.hilt.android' version "$hilt_version" apply false
id 'org.jlleitschuh.gradle.ktlint' version "$klint_version"
id 'org.jlleitschuh.gradle.ktlint-idea' version "$klint_version"
}

allprojects {
repositories {
google()
mavenCentral()
}

apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "org.jlleitschuh.gradle.ktlint-idea"
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.dagger.hilt.android) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kapt) apply false
// TODO: Dagger’s KSP support is currently in alpha, see: https://dagger.dev/dev-guide/ksp
// alias(libs.plugins.ksp) apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
tasks.register('clean', Delete) {
delete rootProject.layout.buildDirectory
}

private File loadVersionPropertiesFile(String moduleName) {
Expand Down
2 changes: 1 addition & 1 deletion gn_mobile_core
Submodule gn_mobile_core updated 41 files
+1 −0 .gitignore
+1 −0 .idea/.name
+3 −3 .idea/gradle.xml
+11 −1 .idea/kotlinc.xml
+10 −0 .idea/migrations.xml
+2 −1 .idea/misc.xml
+17 −0 .idea/runConfigurations.xml
+8 −15 build.gradle
+33 −34 commons/build.gradle
+4 −4 commons/src/main/AndroidManifest.xml
+1 −1 commons/src/main/java/fr/geonature/commons/data/LocalDatabase.kt
+9 −1 commons/src/main/java/fr/geonature/commons/data/entity/AdditionalField.kt
+2 −1 commons/src/main/java/fr/geonature/commons/data/entity/DefaultNomenclatureWithType.kt
+2 −1 commons/src/main/java/fr/geonature/commons/data/entity/NomenclatureWithTaxonomy.kt
+2 −1 commons/src/main/java/fr/geonature/commons/data/entity/NomenclatureWithType.kt
+2 −6 commons/src/main/java/fr/geonature/commons/data/entity/Taxonomy.kt
+4 −5 commons/src/main/java/fr/geonature/commons/util/ThemeUtils.kt
+0 −4 commons/src/main/res/values-fr/strings.xml
+0 −9 commons/src/main/res/values/strings.xml
+10 −10 commons/src/test/java/fr/geonature/commons/data/entity/TaxonomyTest.kt
+2 −2 commons/version.properties
+18 −15 compat/build.gradle
+35 −35 datasync/build.gradle
+1 −0 datasync/src/main/AndroidManifest.xml
+1 −1 datasync/src/main/java/fr/geonature/datasync/api/ITaxHubService.kt
+1 −0 datasync/src/main/java/fr/geonature/datasync/packageinfo/PackageInfoRepositoryImpl.kt
+39 −25 datasync/src/main/java/fr/geonature/datasync/sync/worker/DataSyncWorker.kt
+2 −4 datasync/src/test/java/fr/geonature/datasync/auth/AuthManagerTest.kt
+3 −4 datasync/src/test/java/fr/geonature/datasync/features/settings/usecase/GetAppSettingsFromRemoteUseCaseTest.kt
+1 −0 datasync/src/test/java/fr/geonature/datasync/sync/io/TaxonomyJsonReaderTest.kt
+2 −2 datasync/version.properties
+21 −1 docs/styles_themes.adoc
+21 −2 gradle.properties
+74 −0 gradle/libs.versions.toml
+2 −2 gradle/wrapper/gradle-wrapper.properties
+16 −12 mountpoint/build.gradle
+1 −3 mountpoint/src/main/java/fr/geonature/mountpoint/model/MountPoint.kt
+29 −0 mountpoint/src/main/java/fr/geonature/mountpoint/util/FileHelper.kt
+52 −0 mountpoint/src/test/java/fr/geonature/mountpoint/util/FileHelperTest.kt
+8 −1 settings.gradle
+23 −19 viewpager/build.gradle
2 changes: 1 addition & 1 deletion gn_mobile_maps
Submodule gn_mobile_maps updated 85 files
+1 −0 .gitignore
+0 −5 .gitmodules
+1 −0 .idea/.name
+3 −4 .idea/gradle.xml
+1 −1 .idea/kotlinc.xml
+10 −0 .idea/migrations.xml
+2 −1 .idea/misc.xml
+17 −0 .idea/runConfigurations.xml
+0 −1 .idea/vcs.xml
+6 −9 README.md
+29 −26 app/build.gradle
+16 −11 app/src/main/java/fr/geonature/maps/sample/MainApplication.kt
+7 −5 app/src/main/java/fr/geonature/maps/sample/ui/home/HomeActivity.kt
+4 −4 app/src/main/java/fr/geonature/maps/sample/ui/home/HomeListFragment.kt
+13 −9 app/src/main/java/fr/geonature/maps/sample/ui/map/MapActivity.kt
+18 −10 app/src/main/java/fr/geonature/maps/sample/ui/settings/PreferencesActivity.kt
+9 −4 app/src/main/java/fr/geonature/maps/sample/ui/settings/PreferencesFragment.kt
+2 −2 app/version.properties
+10 −34 build.gradle
+0 −1 compat
+0 −1 gn_mobile_core
+2 −0 gradle.properties
+66 −0 gradle/libs.versions.toml
+1 −1 gradle/wrapper/gradle-wrapper.properties
+21 −23 maps/README.md
+40 −35 maps/build.gradle
+14 −7 maps/src/main/java/fr/geonature/maps/jts/geojson/Feature.kt
+28 −16 maps/src/main/java/fr/geonature/maps/jts/geojson/GeometryUtils.kt
+4 −5 maps/src/main/java/fr/geonature/maps/jts/geojson/io/GeoJsonReader.kt
+14 −17 maps/src/main/java/fr/geonature/maps/layer/presentation/LayerSettingsViewModel.kt
+14 −3 maps/src/main/java/fr/geonature/maps/layer/repository/LayerRepositoryImpl.kt
+3 −3 maps/src/main/java/fr/geonature/maps/layer/tilesource/GeoportailWMTSOnlineLayerTileSource.kt
+43 −0 maps/src/main/java/fr/geonature/maps/settings/LayerPropertiesSettings.kt
+1 −0 maps/src/main/java/fr/geonature/maps/settings/io/MapSettingsReader.kt
+16 −6 maps/src/main/java/fr/geonature/maps/ui/MapFragment.kt
+17 −9 maps/src/main/java/fr/geonature/maps/ui/dialog/LayerSettingsBottomSheetDialogFragment.kt
+1 −2 maps/src/main/java/fr/geonature/maps/ui/overlay/AttributionOverlay.kt
+53 −33 maps/src/main/java/fr/geonature/maps/ui/overlay/CompassOrientationProvider.kt
+99 −27 maps/src/main/java/fr/geonature/maps/ui/overlay/MyLocationOverlay.kt
+18 −8 maps/src/main/java/fr/geonature/maps/ui/widget/MyLocationButton.kt
+10 −6 maps/src/main/java/fr/geonature/maps/ui/widget/ZoomButton.kt
+0 −17 maps/src/main/java/fr/geonature/maps/util/JsonReaderHelper.kt
+0 −50 maps/src/main/java/fr/geonature/maps/util/LiveDataHelper.kt
+2 −2 maps/src/main/java/fr/geonature/maps/util/LowPassSensorValuesFilter.kt
+4 −5 maps/src/main/java/fr/geonature/maps/util/ThemeUtils.kt
+12 −10 maps/src/main/res/drawable/ic_layer_online.xml
+12 −10 maps/src/main/res/drawable/ic_layer_tiles.xml
+12 −10 maps/src/main/res/drawable/ic_layer_vector.xml
+0 −2 maps/src/test/java/fr/geonature/maps/jts/geojson/FeatureTest.kt
+1 −1 maps/src/test/java/fr/geonature/maps/jts/geojson/GeometryUtilsTest.kt
+27 −7 maps/src/test/java/fr/geonature/maps/jts/geojson/io/GeoJsonReaderTest.kt
+33 −59 maps/src/test/java/fr/geonature/maps/layer/data/LayerLocalDataSourceTest.kt
+3 −3 maps/src/test/java/fr/geonature/maps/layer/tilesource/GeoportailWMTSOnlineLayerTileSourceTest.kt
+1 −1 maps/src/test/java/fr/geonature/maps/layer/tilesource/TileSourceFactoryTest.kt
+48 −39 maps/src/test/java/fr/geonature/maps/settings/LayerPropertiesSettingsTest.kt
+18 −0 maps/src/test/java/fr/geonature/maps/settings/io/MapSettingsReaderTest.kt
+1 −1 maps/src/test/java/fr/geonature/maps/ui/overlay/feature/FeatureCollectionOverlayTest.kt
+0 −63 maps/src/test/java/fr/geonature/maps/util/JsonHelperTest.kt
+18 −0 maps/src/test/resources/fixtures/feature_point_property_id_as_numeric.json
+0 −0 maps/src/test/resources/fixtures/feature_point_property_id_as_string.json
+1 −1 maps/src/test/resources/fixtures/featurecollection.json
+1 −1 maps/src/test/resources/fixtures/features.json
+16 −0 maps/src/test/resources/fixtures/map_settings.json
+0 −1 mountpoint
+1 −0 mountpoint/.gitignore
+62 −0 mountpoint/build.gradle
+0 −0 mountpoint/consumer-rules.pro
+21 −0 mountpoint/proguard-rules.pro
+2 −0 mountpoint/src/main/AndroidManifest.xml
+91 −0 mountpoint/src/main/java/fr/geonature/mountpoint/model/MountPoint.kt
+16 −0 mountpoint/src/main/java/fr/geonature/mountpoint/util/DeviceUtils.kt
+29 −0 mountpoint/src/main/java/fr/geonature/mountpoint/util/FileHelper.kt
+82 −0 mountpoint/src/main/java/fr/geonature/mountpoint/util/FileUtils.kt
+455 −0 mountpoint/src/main/java/fr/geonature/mountpoint/util/MountPointUtils.kt
+12 −0 mountpoint/src/main/res/values-fr/strings.xml
+12 −0 mountpoint/src/main/res/values/strings.xml
+106 −0 mountpoint/src/test/java/fr/geonature/mountpoint/model/MountPointTest.kt
+52 −0 mountpoint/src/test/java/fr/geonature/mountpoint/util/FileHelperTest.kt
+59 −0 mountpoint/src/test/java/fr/geonature/mountpoint/util/FileUtilsTest.kt
+89 −0 mountpoint/src/test/java/fr/geonature/mountpoint/util/MountPointUtilsTest.kt
+1 −0 mountpoint/src/test/resources/robolectric.properties
+4 −0 mountpoint/src/test/resources/tinylog-test.properties
+2 −0 mountpoint/version.properties
+23 −1 settings.gradle
+0 −9 upgrade_submodules.sh
90 changes: 90 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[versions]
activityKtx = "1.9.2"
agp = "8.7.1"
annotation = "1.8.2"
appcompat = "1.7.0"
cardview = "1.0.0"
constraintlayout = "2.1.4"
core = "1.6.1"
coreKtx = "1.13.1"
coreTesting = "2.2.0"
fastscroll = "2.0.1"
fragmentKtx = "1.8.4"
hiltAndroid = "2.52"
hiltWork = "1.2.0"
jts = "1.20.0"
junit = "4.13.2"
junitKtx = "1.2.1"
kapt = "2.0.21"
# ksp = "2.0.20-1.0.24"
kotlin = "2.0.21"
kotlinxCoroutinesTest = "1.9.0"
lifecycleCommon = "2.8.6"
lifecycleLivedataKtx = "2.8.6"
loggingInterceptor = "4.9.3"
material = "1.12.0"
mockk = "1.13.13"
mockwebserver = "4.10.0"
osmdroidAndroid = "6.1.20"
preferenceKtx = "1.2.1"
recyclerview = "1.3.2"
retrofit = "2.9.0"
robolectric = "4.13"
room = "2.6.1"
tinylog = "2.7.0"
viewpager2 = "1.1.0"
workRuntimeKtx = "2.9.1"

[libraries]
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" }
androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-cardview = { module = "androidx.cardview:cardview", version.ref = "cardview" }
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
androidx-core = { module = "androidx.test:core", version.ref = "core" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" }
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentKtx" }
androidx-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "hiltWork" }
androidx-hilt-work = { module = "androidx.hilt:hilt-work", version.ref = "hiltWork" }
androidx-junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "junitKtx" }
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "lifecycleCommon" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleLivedataKtx" }
androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" }
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
androidx-viewpager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "viewpager2" }
androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
androidx-work-testing = { module = "androidx.work:work-testing", version.ref = "workRuntimeKtx" }
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
fastscroll = { module = "io.github.l4digital:fastscroll", version.ref = "fastscroll" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }
hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hiltAndroid" }
hilt-android-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "hiltAndroid" }
jts-core = { module = "org.locationtech.jts:jts-core", version.ref = "jts" }
junit = { module = "junit:junit", version.ref = "junit" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" }
logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
material = { module = "com.google.android.material:material", version.ref = "material" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
mockk-agent-jvm = { module = "io.mockk:mockk-agent-jvm", version.ref = "mockk" }
mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "mockwebserver" }
osmdroid-android = { module = "org.osmdroid:osmdroid-android", version.ref = "osmdroidAndroid" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
slf4j-tinylog = { module = "org.tinylog:slf4j-tinylog", version.ref = "tinylog" }
tinylog-api-kotlin = { group = "org.tinylog", name = "tinylog-api-kotlin", version.ref = "tinylog" }
tinylog-impl = { group = "org.tinylog", name = "tinylog-impl", version.ref = "tinylog" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
dagger-hilt-android = { id = "com.google.dagger.hilt.android" , version.ref = "hiltAndroid" }
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kapt" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
# TODO: Dagger’s KSP support is currently in alpha, see: https://dagger.dev/dev-guide/ksp
# ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
81 changes: 41 additions & 40 deletions occtax/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
plugins {
id 'com.android.application'
id 'dagger.hilt.android.plugin'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
alias(libs.plugins.android.application)
alias(libs.plugins.dagger.hilt.android)
alias(libs.plugins.kapt)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
}

android {
compileSdkVersion 33

namespace 'fr.geonature.occtax'

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}

dependenciesInfo {
Expand All @@ -27,8 +28,9 @@ android {

defaultConfig {
applicationId "fr.geonature.occtax2"
compileSdk 34
minSdkVersion 26
targetSdkVersion 33
targetSdkVersion 34
versionCode 3310
versionName "2.7.0"
buildConfigField "String", "BUILD_DATE", "\"" + new Date().getTime() + "\""
Expand Down Expand Up @@ -56,16 +58,15 @@ android {
}
}

flavorDimensions "version"
productFlavors {
generic {}
}

testOptions {
unitTests {
includeAndroidResources = true
}
}

buildFeatures {
buildConfig true
}
}

dependencies {
Expand All @@ -77,33 +78,33 @@ dependencies {
implementation project(':maps')

// Hilt dependencies
implementation "androidx.hilt:hilt-work:$androidx_hilt_version"
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "androidx.hilt:hilt-compiler:$androidx_hilt_version"
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"

implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.work:work-runtime-ktx:2.8.1'
implementation "io.github.l4digital:fastscroll:2.0.1"
implementation libs.androidx.hilt.work
implementation libs.hilt.android
kapt libs.androidx.hilt.compiler
kapt libs.hilt.android.compiler

implementation libs.androidx.cardview
implementation libs.androidx.constraintlayout
implementation libs.androidx.lifecycle.livedata.ktx
implementation libs.androidx.preference.ktx
implementation libs.androidx.recyclerview
implementation libs.material
implementation libs.androidx.work.runtime.ktx
implementation libs.fastscroll

// Logging
implementation "org.tinylog:tinylog-api-kotlin:$tinylog_version"
runtimeOnly "org.tinylog:tinylog-impl:$tinylog_version"
implementation libs.tinylog.api.kotlin
runtimeOnly libs.tinylog.impl

// Testing dependencies
testImplementation 'androidx.arch.core:core-testing:2.2.0'
testImplementation 'androidx.test.ext:junit-ktx:1.1.5'
testImplementation 'androidx.work:work-testing:2.8.1'
testImplementation("com.squareup.okhttp3:mockwebserver:4.10.0")
testImplementation 'io.mockk:mockk:1.13.4'
testImplementation 'io.mockk:mockk-agent-jvm:1.13.4'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
testImplementation 'org.robolectric:robolectric:4.9.2'
testImplementation "org.tinylog:slf4j-tinylog:$tinylog_version"
testImplementation libs.androidx.core.testing
testImplementation libs.androidx.junit.ktx
testImplementation libs.androidx.work.testing
testImplementation(libs.mockwebserver)
testImplementation libs.mockk
testImplementation libs.mockk.agent.jvm
testImplementation libs.junit
testImplementation libs.kotlinx.coroutines.test
testImplementation libs.robolectric
testImplementation libs.slf4j.tinylog
}
10 changes: 7 additions & 3 deletions occtax/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?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="fr.geonature.occtax">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.VIBRATE" />

<application
android:name=".MainApplication"
Expand Down Expand Up @@ -67,6 +66,11 @@
android:label="@string/activity_counting_media_title"
android:theme="@style/AppTheme.NoActionBar" />

<service
android:name="androidx.work.impl.foreground.SystemForegroundService"
android:foregroundServiceType="dataSync"
tools:node="merge" />

<!--+
| remove the default initializer
+-->
Expand Down
5 changes: 2 additions & 3 deletions occtax/src/main/java/fr/geonature/occtax/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ class MainApplication : Application(), Configuration.Provider {
checkInputsToSynchronize()
}

override fun getWorkManagerConfiguration(): Configuration {
return Configuration
override val workManagerConfiguration: Configuration
get() = Configuration
.Builder()
.setWorkerFactory(workerFactory)
.build()
}

private fun configureLogger() {
val directoryForLogs: File = FileUtils.getFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class DatasetListFragment : Fragment() {
setHasOptionsMenu(true)
}

@Deprecated("Deprecated in Java")
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
android.R.id.home -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class ObservationRecordRecyclerViewAdapter(listener: OnListItemRecyclerViewAdapt
setIndicatorColor(
getColor(
context,
R.attr.colorOnPrimary
com.google.android.material.R.attr.colorOnPrimary
)
)
}.indeterminateDrawable?.apply {
Expand All @@ -120,7 +120,7 @@ class ObservationRecordRecyclerViewAdapter(listener: OnListItemRecyclerViewAdapt
setTextColor(
getColor(
context,
R.attr.colorOnPrimary
com.google.android.material.R.attr.colorOnPrimary
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class ObservationRecordsListFragment : Fragment(R.layout.fragment_recycler_view_
)
}

@Deprecated("Deprecated in Java")
override fun onCreateOptionsMenu(
menu: Menu,
inflater: MenuInflater
Expand All @@ -199,6 +200,7 @@ class ObservationRecordsListFragment : Fragment(R.layout.fragment_recycler_view_
}
}

@Deprecated("Deprecated in Java")
override fun onPrepareOptionsMenu(menu: Menu) {
super.onPrepareOptionsMenu(menu)

Expand Down Expand Up @@ -235,6 +237,7 @@ class ObservationRecordsListFragment : Fragment(R.layout.fragment_recycler_view_
}
}

@Deprecated("Deprecated in Java")
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.menu_sync -> {
Expand Down
Loading

0 comments on commit eb43c02

Please sign in to comment.