From 373a46f73a51bda3900b895f72fba5ca619e5884 Mon Sep 17 00:00:00 2001 From: Aditya Wasan Date: Tue, 25 May 2021 15:15:26 +0530 Subject: Add compose dependencies (#1421) Co-authored-by: Harsh Shandilya --- app/build.gradle.kts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'app') diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b0ee9972..ca591aef 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,6 +14,22 @@ plugins { `crowdin-plugin` } +repositories { + val composeSnapshot = libs.versions.composeSnapshot.get() + if (composeSnapshot.isNotEmpty()) { + maven("https://androidx.dev/snapshots/builds/$composeSnapshot/artifacts/repository/") { + content { + includeGroup("androidx.compose.animation") + includeGroup("androidx.compose.compiler") + includeGroup("androidx.compose.foundation") + includeGroup("androidx.compose.material") + includeGroup("androidx.compose.runtime") + includeGroup("androidx.compose.ui") + } + } + } +} + configure { projectName = "android-password-store" } android { @@ -31,12 +47,15 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } + buildFeatures.compose = true + lintOptions { isAbortOnError = true isCheckReleaseBuilds = false disable("MissingTranslation", "PluralsCandidate", "ImpliedQuantity") // https://issuetracker.google.com/issues/187524311 disable("DialogFragmentCallbacksDetector") + disable("CoroutineCreationDuringComposition") } flavorDimensions("free") @@ -45,6 +64,11 @@ android { create("nonFree") {} } testOptions { unitTests.isReturnDefaultValues = true } + + composeOptions { + kotlinCompilerVersion = libs.versions.kotlin.get() + kotlinCompilerExtensionVersion = libs.versions.compose.get() + } } dependencies { @@ -74,6 +98,15 @@ dependencies { implementation(libs.kotlin.coroutines.android) implementation(libs.kotlin.coroutines.core) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.hilt.compose) + implementation(libs.compose.foundation.core) + implementation(libs.compose.foundation.layout) + implementation(libs.compose.material) + implementation(libs.compose.ui.core) + implementation(libs.compose.ui.viewbinding) + compileOnly(libs.compose.ui.tooling) + implementation(libs.aps.sublimeFuzzy) implementation(libs.aps.zxingAndroidEmbedded) -- cgit v1.2.3