Skip to content

Commit

Permalink
Update java target version (#417)
Browse files Browse the repository at this point in the history
* Update Java target and compatibility to v11, update dependencies

* Fix Application bringing to front on NFC Engagement
  • Loading branch information
mitrejcevski authored Nov 28, 2023
1 parent 05a1e96 commit 56b4542
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 40 deletions.
6 changes: 3 additions & 3 deletions appholder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ android {
}

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

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}

buildFeatures {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,11 @@ private fun DocumentInfoScreenContent(
)
}
}
val pagerState = rememberPagerState()
val pagerState = rememberPagerState(pageCount = { screenState.authKeys.size })
HorizontalPager(
modifier = Modifier
.fillMaxWidth(),
state = pagerState,
pageCount = screenState.authKeys.size
) { page ->
val key = screenState.authKeys[page]
AuthenticationKeyInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ class NfcEngagementHandler : HostApduService() {

override fun onDeviceConnecting() {
log("Engagement Listener: Device Connecting. Launching Transfer Screen")
val launchAppIntent =
Intent(applicationContext, com.android.identity.wallet.MainActivity::class.java)
launchAppIntent.action = Intent.ACTION_VIEW
launchAppIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
launchAppIntent.addCategory(Intent.CATEGORY_DEFAULT)
launchAppIntent.addCategory(Intent.CATEGORY_BROWSABLE)
applicationContext.startActivity(launchAppIntent)

val pendingIntent = NavDeepLinkBuilder(applicationContext)
.setGraph(R.navigation.navigation_graph)
.setDestination(R.id.transferDocumentFragment)
Expand Down Expand Up @@ -146,6 +138,13 @@ class NfcEngagementHandler : HostApduService() {
builder.useNegotiatedHandover()
}
engagementHelper = builder.build()

val launchAppIntent = Intent(applicationContext, com.android.identity.wallet.MainActivity::class.java)
launchAppIntent.action = Intent.ACTION_VIEW
launchAppIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
launchAppIntent.addCategory(Intent.CATEGORY_DEFAULT)
launchAppIntent.addCategory(Intent.CATEGORY_BROWSABLE)
applicationContext.startActivity(launchAppIntent)
}

override fun processCommandApdu(commandApdu: ByteArray, extras: Bundle?): ByteArray? {
Expand Down
6 changes: 3 additions & 3 deletions appverifier/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ android {
}

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

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}

buildFeatures {
Expand Down
26 changes: 13 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[versions]
compile-sdk = "33"
compile-sdk = "34"
min-sdk = "26"
kotlin = "1.8.20"
gradle-plugin = "7.4.0"
core-ktx = "1.10.1"
activity-compose = "1.8.0"
core-ktx = "1.12.0"
activity-compose = "1.8.1"
appcompat = "1.6.1"
material = "1.9.0"
material = "1.10.0"
constraint-layout = "2.1.4"
lifecycle = "2.2.0"
lifecycle-ktx = "2.6.1"
fragment = "1.6.0"
compose-bom = "2023.06.00"
lifecycle-ktx = "2.6.2"
fragment = "1.6.2"
compose-bom = "2023.10.01"
kotlin-compiler-extension = "1.4.6"
kotlinx-serialization-version = "1.5.0"
legacy-support-v4 = "1.0.0"
androidx-preference = "1.2.0"
androidx-annotation = "1.6.0"
coroutines-version = "1.7.1"
androidx-preference = "1.2.1"
androidx-annotation = "1.7.0"
coroutines-version = "1.7.3"
zxing = "3.4.0"
volley = "1.2.1"
biometrics = "1.2.0-alpha05"
Expand All @@ -26,14 +26,14 @@
bouncy-castle = "1.70"
sonar-gradle-plugin = "3.4.0.2513"
jacoco = "0.47.0"
navigation = "2.6.0"
navigation = "2.7.5"
work-version = "2.8.1"
navigation_plugin = "2.5.3"
code_scanner = "2.1.0"
junit-android-test = "1.1.5"
espresso-core = "3.5.1"
junit-jupiter = "5.9.2"
truth = "1.1.3"
junit-jupiter = "5.10.0"
truth = "1.1.5"

[libraries]
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
Expand Down
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-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
6 changes: 3 additions & 3 deletions identity-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ android {
}

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

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}

namespace "com.android.identity"
Expand Down
4 changes: 2 additions & 2 deletions identity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions secure-area-test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}
buildFeatures {
compose true
Expand Down
4 changes: 2 additions & 2 deletions wwwverifier/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ appengine {
}
}

java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11

publishing {
publications {
Expand Down

0 comments on commit 56b4542

Please sign in to comment.