From 2320201f895530d127441b15317bb6a557820396 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 27 Mar 2022 18:07:18 +0530 Subject: Migrate namespaces to Gradle (#1805) * ui-compose: update Gradle configuration * gradle: fix namespace for a couple astray Compose dependencies * all: switch to Gradle namespace property Mirrors a similar change from AndroidX https://github.com/androidx/androidx/commit/dcfa035a961fd1daabb7dcccf97d77fa2a006abf --- app/build.gradle.kts | 2 ++ app/src/main/AndroidManifest.xml | 1 - autofill-parser/build.gradle.kts | 1 + autofill-parser/src/main/AndroidManifest.xml | 2 +- gradle/libs.versions.toml | 4 ++-- openpgp-ktx/build.gradle.kts | 2 +- openpgp-ktx/src/main/AndroidManifest.xml | 2 +- passgen/diceware/build.gradle.kts | 5 ++++- passgen/diceware/src/main/AndroidManifest.xml | 2 +- ui-compose/build.gradle.kts | 25 ++++++++++++++++--------- ui-compose/src/main/AndroidManifest.xml | 2 +- 11 files changed, 30 insertions(+), 18 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ff09a750..b81b386e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -35,6 +35,8 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } + namespace = "dev.msfjarvis.aps" + lint { abortOnError = true checkReleaseBuilds = false diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 239cb4f8..76923813 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,7 +5,6 @@ diff --git a/autofill-parser/build.gradle.kts b/autofill-parser/build.gradle.kts index f164f07e..0abeaa0e 100644 --- a/autofill-parser/build.gradle.kts +++ b/autofill-parser/build.gradle.kts @@ -13,6 +13,7 @@ plugins { android { defaultConfig { consumerProguardFiles("consumer-rules.pro") } sourceSets { getByName("test") { resources.srcDir("src/main/assets") } } + namespace = "com.github.androidpasswordstore.autofillparser" } dependencies { diff --git a/autofill-parser/src/main/AndroidManifest.xml b/autofill-parser/src/main/AndroidManifest.xml index 997924d6..e3cc34c8 100644 --- a/autofill-parser/src/main/AndroidManifest.xml +++ b/autofill-parser/src/main/AndroidManifest.xml @@ -3,4 +3,4 @@ ~ SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception --> - + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e698fc22..3ff909c0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,12 +21,10 @@ androidx-annotation = "androidx.annotation:annotation:1.3.0" androidx-appcompat = "androidx.appcompat:appcompat:1.4.1" androidx-autofill = "androidx.autofill:autofill:1.2.0-beta01" androidx-biometricKtx = "androidx.biometric:biometric-ktx:1.2.0-alpha04" -androidx-compose-material3 = "androidx.compose.material3:material3:1.0.0-alpha08" androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.3" androidx-core-ktx = "androidx.core:core-ktx:1.8.0-alpha06" androidx-documentfile = "androidx.documentfile:documentfile:1.1.0-alpha01" androidx-fragment-ktx = "androidx.fragment:fragment-ktx:1.4.1" -androidx-hilt-compose = "androidx.hilt:hilt-navigation-compose:1.0.0" androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "lifecycle" } androidx-lifecycle-livedataKtx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" } @@ -61,7 +59,9 @@ compose-animation = { module = "androidx.compose.animation:animation", version.r compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "compose" } compose-foundation-core = { module = "androidx.compose.foundation:foundation", version.ref = "compose" } compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "compose" } +compose-hilt = "androidx.hilt:hilt-navigation-compose:1.0.0" compose-material = { module = "androidx.compose.material:material", version.ref = "compose" } +compose-material3 = "androidx.compose.material3:material3:1.0.0-alpha08" compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "compose" } compose-ui-core = { module = "androidx.compose.ui:ui", version.ref = "compose" } compose-ui-test = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" } diff --git a/openpgp-ktx/build.gradle.kts b/openpgp-ktx/build.gradle.kts index d29d18d5..e68f8ecd 100644 --- a/openpgp-ktx/build.gradle.kts +++ b/openpgp-ktx/build.gradle.kts @@ -11,8 +11,8 @@ plugins { android { defaultConfig { consumerProguardFiles("consumer-proguard-rules.pro") } - buildFeatures.aidl = true + namespace = "me.msfjarvis.openpgpktx" } dependencies { implementation(libs.kotlin.coroutines.core) } diff --git a/openpgp-ktx/src/main/AndroidManifest.xml b/openpgp-ktx/src/main/AndroidManifest.xml index 1e77bc4e..77c870d3 100644 --- a/openpgp-ktx/src/main/AndroidManifest.xml +++ b/openpgp-ktx/src/main/AndroidManifest.xml @@ -3,4 +3,4 @@ ~ SPDX-License-Identifier: Apache-2.0 --> - + diff --git a/passgen/diceware/build.gradle.kts b/passgen/diceware/build.gradle.kts index a6d0f119..40c703c5 100644 --- a/passgen/diceware/build.gradle.kts +++ b/passgen/diceware/build.gradle.kts @@ -9,7 +9,10 @@ plugins { id("com.github.android-password-store.kotlin-library") } -android { sourceSets { getByName("test") { resources.srcDir("src/main/res/raw") } } } +android { + sourceSets { getByName("test") { resources.srcDir("src/main/res/raw") } } + namespace = "dev.msfjarvis.aps.passgen.diceware" +} dependencies { implementation(libs.dagger.hilt.core) diff --git a/passgen/diceware/src/main/AndroidManifest.xml b/passgen/diceware/src/main/AndroidManifest.xml index 6dff3e51..e3cc34c8 100644 --- a/passgen/diceware/src/main/AndroidManifest.xml +++ b/passgen/diceware/src/main/AndroidManifest.xml @@ -3,4 +3,4 @@ ~ SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception --> - + diff --git a/ui-compose/build.gradle.kts b/ui-compose/build.gradle.kts index e84b0ac1..19b06532 100644 --- a/ui-compose/build.gradle.kts +++ b/ui-compose/build.gradle.kts @@ -4,14 +4,21 @@ plugins { id("com.github.android-password-store.kotlin-library") } +android { + buildFeatures { + compose = true + composeOptions { + useLiveLiterals = false + kotlinCompilerExtensionVersion = libs.versions.compose.get() + } + } + namespace = "dev.msfjarvis.aps.ui.compose" +} + dependencies { - 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.androidx.compose.material3) - implementation(libs.compose.ui.core) - implementation(libs.compose.ui.viewbinding) - compileOnly(libs.compose.ui.tooling) + api(libs.compose.foundation.core) + api(libs.compose.foundation.layout) + api(libs.compose.material) + api(libs.compose.material3) + api(libs.compose.ui.core) } diff --git a/ui-compose/src/main/AndroidManifest.xml b/ui-compose/src/main/AndroidManifest.xml index 482100e7..e3cc34c8 100644 --- a/ui-compose/src/main/AndroidManifest.xml +++ b/ui-compose/src/main/AndroidManifest.xml @@ -3,4 +3,4 @@ ~ SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception --> - + -- cgit v1.2.3