Skip to content

Commit

Permalink
Feature/nevisaccessapp 6211 gradle updates (#23)
Browse files Browse the repository at this point in the history
- Update Gradle to v8.7 (including scripts) and AGP to v8.6.1
- Set Java source compatibility to 17 as required by Gradle
- Set target SDK version to 34 (Android 14) and update dependencies
- Set Java source compatibility to 17 as required by Gradle
- Update Kotlin to v1.9.23
- Changed visibility of injected properties as required by newer Dagger version
- Update GitHub Actions to also use Java 17
- Update Development Setup in README
  • Loading branch information
balazs-gerlei authored Oct 2, 2024
1 parent c4fdacb commit ba50a95
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:

env:
JAVA_VERSION: '11'
JAVA_VERSION: '17'
RUBY_VERSION: '3.0'
CURRENT_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [opened, edited, synchronize, reopened]

env:
JAVA_VERSION: '11'
JAVA_VERSION: '17'
RUBY_VERSION: '3.0'

jobs:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ Before you start compiling and using the example applications please ensure you
- Android 6 or later, with API level 23
- Android 10 or later, with API level 29, for the biometric authenticator to work
- Android 11 or later, with API level 30, for the device passcode authenticator to work
- Android Studio 3.5.1 or later
- JDK 11
- Gradle 7.2 or later
- JDK 17
- Gradle 8.7 or later

### Github Account

Expand Down
28 changes: 14 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ static def readVersionName(project) {

android {
namespace 'ch.nevis.exampleapp.coroutines'
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "ch.nevis.exampleapp.coroutines"
minSdkVersion 23
targetSdkVersion 33
targetSdkVersion 34
versionCode readVersionCode(this)
versionName readVersionName(this)

Expand All @@ -61,34 +61,34 @@ android {
}

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

kotlinOptions {
jvmTarget = 11
jvmTarget = 17
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.fragment:fragment-ktx:1.6.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.fragment:fragment-ktx:1.8.3'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.google.android.material:material:1.12.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

// Barcode Scanning
implementation 'com.google.mlkit:barcode-scanning:17.2.0'
implementation 'com.google.mlkit:barcode-scanning:17.3.0'

// CameraX
def camerax_version = "1.2.3"
def camerax_version = "1.3.4"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Nevis Mobile Authentication SDK Example App
*
* Copyright © 2022. Nevis Security AG. All rights reserved.
* Copyright © 2022-2024. Nevis Security AG. All rights reserved.
*/

package ch.nevis.exampleapp.coroutines.ui.base
Expand All @@ -27,7 +27,7 @@ abstract class CancellableOperationViewModel : OperationViewModel() {
* An instance of a [CancelOperationUseCase] implementation.
*/
@Inject
protected lateinit var cancelOperationUseCase: CancelOperationUseCase
lateinit var cancelOperationUseCase: CancelOperationUseCase
//endregion

//region Public Interface
Expand All @@ -41,4 +41,4 @@ abstract class CancellableOperationViewModel : OperationViewModel() {
}
}
//endregion
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Nevis Mobile Authentication SDK Example App
*
* Copyright © 2022. Nevis Security AG. All rights reserved.
* Copyright © 2022-2024. Nevis Security AG. All rights reserved.
*/

package ch.nevis.exampleapp.coroutines.ui.base
Expand Down Expand Up @@ -41,13 +41,13 @@ abstract class OperationViewModel : ViewModel() {
* An instance of a [FinishOperationUseCase] implementation.
*/
@Inject
protected lateinit var finishOperationUseCase: FinishOperationUseCase
lateinit var finishOperationUseCase: FinishOperationUseCase

/**
* An instance of a [DeregisterUseCase] implementation.
*/
@Inject
protected lateinit var deregisterUseCase: DeregisterUseCase
lateinit var deregisterUseCase: DeregisterUseCase

/**
* Common [CoroutineExceptionHandler] error handler implementation that can be used by the sub-classes of this abstract view model.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Nevis Mobile Authentication SDK Example App
*
* Copyright © 2022. Nevis Security AG. All rights reserved.
* Copyright © 2022-2024. Nevis Security AG. All rights reserved.
*/

package ch.nevis.exampleapp.coroutines.ui.base
Expand All @@ -24,13 +24,13 @@ abstract class OutOfBandOperationViewModel : CancellableOperationViewModel() {
* An instance of a [DecodePayloadUseCase] implementation.
*/
@Inject
protected lateinit var decodePayloadUseCase: DecodePayloadUseCase
lateinit var decodePayloadUseCase: DecodePayloadUseCase

/**
* An instance of a [ProcessOutOfBandPayloadUseCase] implementation.
*/
@Inject
protected lateinit var processOutOfBandPayloadUseCase: ProcessOutOfBandPayloadUseCase
lateinit var processOutOfBandPayloadUseCase: ProcessOutOfBandPayloadUseCase
//endregion

//region Public Interface
Expand Down Expand Up @@ -58,4 +58,4 @@ abstract class OutOfBandOperationViewModel : CancellableOperationViewModel() {
}
}
//endregion
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Nevis Mobile Authentication SDK Example App
*
* Copyright © 2022. Nevis Security AG. All rights reserved.
* Copyright © 2022-2024. Nevis Security AG. All rights reserved.
*/

package ch.nevis.exampleapp.coroutines.ui.base
Expand Down Expand Up @@ -56,7 +56,7 @@ abstract class ResponseObserverFragment : Fragment() {
* handler chain instance.
*/
@Inject
protected lateinit var errorHandlerChain: ErrorHandlerChain
lateinit var errorHandlerChain: ErrorHandlerChain

//region Fragment
/** @suppress */
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
buildscript {
ext.coroutine_version = "1.6.4"
ext.dagger_hilt_version = "2.44.2"
ext.gradle_version = '7.3.1'
ext.kotlin_version = "1.8.10"
ext.navigation_version = "2.5.3"
ext.coroutine_version = "1.8.0"
ext.dagger_hilt_version = "2.51.1"
ext.gradle_version = '8.6.1'
ext.kotlin_version = "1.9.23"
ext.navigation_version = "2.8.1"
ext.dokka_version = "1.9.20"
ext.customFooterMessage = "© 2024 made with ❤️ by Nevis"
ext.customLogoFile = projectDir.toString() + "/logo-style.css"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ kotlin.code.style=official
VERSION_NAME=3.7.0
VERSION_CODE=1
NEVIS_MOBILE_AUTHENTICATION_SDK_VERSION=3.7.+
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Jun 17 11:02:48 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ba50a95

Please sign in to comment.