diff --git a/app/build.gradle b/app/build.gradle index 41ac6c6b6..bbb20451c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,6 @@ android { pseudoLocalesEnabled true } } - defaultConfig { // We have to list all translated languages here, because some of our libs have bogus languages that google play // doesn't like and we need to strip them (gr) @@ -73,26 +72,28 @@ android { // abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" } } - buildFeatures { viewBinding true } - + buildFeatures { + compose true + } // Set both the Java and Kotlin compilers to target Java 8. - compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - kotlinOptions { jvmTarget = "1.8" freeCompilerArgs += ['-opt-in=kotlin.RequiresOptIn'] } + composeOptions { + kotlinCompilerExtensionVersion compose_version + } lint { abortOnError false } - + namespace 'com.geeksville.mesh' } play { @@ -133,15 +134,32 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.viewpager2:viewpager2:1.0.0' - implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1' - implementation "androidx.room:room-runtime:$room_version" - implementation "com.google.dagger:hilt-android:$hilt_version" - implementation "androidx.datastore:datastore:$datastore_version" - kapt "androidx.room:room-compiler:$room_version" - kapt "com.google.dagger:hilt-compiler:$hilt_version" - //OSMDROID, mgrs, + // Lifecycle + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version" + + implementation "androidx.room:room-runtime:$room_version" + kapt "androidx.room:room-compiler:$room_version" + implementation "com.google.dagger:hilt-android:$hilt_version" + kapt "com.google.dagger:hilt-compiler:$hilt_version" + implementation "androidx.datastore:datastore:$datastore_version" + + // Compose + implementation "androidx.compose.runtime:runtime:$compose_version" + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.foundation:foundation:$compose_version" + implementation "androidx.compose.foundation:foundation-layout:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.runtime:runtime-livedata:$compose_version" + implementation "androidx.compose.ui:ui-tooling:$compose_version" + implementation "com.google.android.material:compose-theme-adapter:1.1.14" + + // Osmdroid & Maps implementation 'org.osmdroid:osmdroid-android:6.1.14' implementation 'com.github.MKergall:osmbonuspack:6.9.0' implementation 'org.osmdroid:osmdroid-wms:6.1.14' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bbd202024..936141e97 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ diff --git a/build.gradle b/build.gradle index 1c9ce9d1a..b439eed88 100644 --- a/build.gradle +++ b/build.gradle @@ -4,9 +4,11 @@ buildscript { ext { kotlin_version = '1.6.21' coroutines_version = '1.6.0' + lifecycle_version = "2.5.1" room_version = '2.4.3' hilt_version = '2.40.5' datastore_version = '1.0.0' + compose_version = '1.2.0-rc02' } repositories { @@ -14,7 +16,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.2' + classpath 'com.android.tools.build:gradle:7.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5e7360528..3a50cc23e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip