Skip to content

Commit

Permalink
Android: Modernize build code, bump dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Patryk Miś <[email protected]>
  • Loading branch information
PatrykMis committed Mar 2, 2024
1 parent 9574cda commit 4659368
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
26 changes: 12 additions & 14 deletions Android/PolishBanknotesApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ plugins {
id 'androidx.navigation.safeargs.kotlin'
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.ADOPTIUM)
}
}

android {
compileSdk 34
namespace 'pg.eti.project.polishbanknotes'

defaultConfig {
applicationId "pg.eti.project.polishbanknotes"
minSdk 24
minSdk 26
// Must be the same as compileSdk
targetSdk 34
versionCode 4
Expand Down Expand Up @@ -38,15 +45,6 @@ android {
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

buildFeatures {
viewBinding true
mlModelBinding true
Expand All @@ -69,18 +67,18 @@ dependencies {

// App compat and UI things
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'org.tensorflow:tensorflow-lite-metadata:0.4.4'
implementation 'androidx.preference:preference-ktx:1.2.1'

// Navigation library
def nav_version = "2.7.5"
def nav_version = "2.7.7"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

// CameraX core library
def camerax_version = '1.3.0'
def camerax_version = '1.3.1'
implementation "androidx.camera:camera-core:$camerax_version"

// CameraX Camera2 extensions
Expand All @@ -105,7 +103,7 @@ dependencies {
implementation 'org.tensorflow:tensorflow-lite-task-vision:0.4.4'
// Import the GPU delegate plugin Library for GPU inference
implementation 'org.tensorflow:tensorflow-lite-gpu-delegate-plugin:0.4.4'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.14.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.15.0'

// Settings addons
implementation 'com.jaredrummler:colorpicker:1.1.0'
Expand Down
6 changes: 3 additions & 3 deletions Android/PolishBanknotesApp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

plugins {
id 'com.android.application' version '8.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.21' apply false
id 'androidx.navigation.safeargs.kotlin' version '2.7.5' apply false
id 'com.android.application' version '8.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
id 'androidx.navigation.safeargs.kotlin' version '2.7.7' apply false
}

0 comments on commit 4659368

Please sign in to comment.