diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 73bc4c761c..cd4206e498 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -241,6 +241,9 @@ dependencies { allServicesImpl() if (isEnterpriseBuild) { allEnterpriseImpl(rootDir, logger) + // TODO implementation(projects.appicon.enterprise) + } else { + implementation(projects.appicon.element) } allFeaturesImpl(rootDir, logger) implementation(projects.features.migration.api) diff --git a/appicon/element/build.gradle.kts b/appicon/element/build.gradle.kts new file mode 100644 index 0000000000..7e45c16e02 --- /dev/null +++ b/appicon/element/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +plugins { + id("io.element.android-compose-library") +} + +android { + namespace = "io.element.android.appicon.element" + + buildTypes { + register("nightly") + } +} diff --git a/app/src/debug/res/drawable/ic_launcher_background.xml b/appicon/element/src/debug/res/drawable/ic_launcher_background.xml similarity index 100% rename from app/src/debug/res/drawable/ic_launcher_background.xml rename to appicon/element/src/debug/res/drawable/ic_launcher_background.xml diff --git a/app/src/main/ic_launcher-playstore.png b/appicon/element/src/main/ic_launcher-playstore.png similarity index 100% rename from app/src/main/ic_launcher-playstore.png rename to appicon/element/src/main/ic_launcher-playstore.png diff --git a/app/src/main/kotlin/io/element/android/x/icon/IconPreview.kt b/appicon/element/src/main/kotlin/io/element/android/appicon/element/IconPreview.kt similarity index 97% rename from app/src/main/kotlin/io/element/android/x/icon/IconPreview.kt rename to appicon/element/src/main/kotlin/io/element/android/appicon/element/IconPreview.kt index ce8eb0eba7..749ed8571a 100644 --- a/app/src/main/kotlin/io/element/android/x/icon/IconPreview.kt +++ b/appicon/element/src/main/kotlin/io/element/android/appicon/element/IconPreview.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.icon +package io.element.android.appicon.element import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -31,7 +31,6 @@ import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import io.element.android.x.R @Preview @Composable diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/appicon/element/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to appicon/element/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/appicon/element/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to appicon/element/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/appicon/element/src/main/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher.webp rename to appicon/element/src/main/res/mipmap-hdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_background.webp b/appicon/element/src/main/res/mipmap-hdpi/ic_launcher_background.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_background.webp rename to appicon/element/src/main/res/mipmap-hdpi/ic_launcher_background.webp diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/appicon/element/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp rename to appicon/element/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.webp b/appicon/element/src/main/res/mipmap-hdpi/ic_launcher_monochrome.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.webp rename to appicon/element/src/main/res/mipmap-hdpi/ic_launcher_monochrome.webp diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/appicon/element/src/main/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_round.webp rename to appicon/element/src/main/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/appicon/element/src/main/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher.webp rename to appicon/element/src/main/res/mipmap-mdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_background.webp b/appicon/element/src/main/res/mipmap-mdpi/ic_launcher_background.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_background.webp rename to appicon/element/src/main/res/mipmap-mdpi/ic_launcher_background.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/appicon/element/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp rename to appicon/element/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.webp b/appicon/element/src/main/res/mipmap-mdpi/ic_launcher_monochrome.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.webp rename to appicon/element/src/main/res/mipmap-mdpi/ic_launcher_monochrome.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/appicon/element/src/main/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_round.webp rename to appicon/element/src/main/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/appicon/element/src/main/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher.webp rename to appicon/element/src/main/res/mipmap-xhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp b/appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_background.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp rename to appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_background.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp rename to appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.webp b/appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.webp rename to appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp rename to appicon/element/src/main/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher.webp rename to appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp b/appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp rename to appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp rename to appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.webp b/appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.webp rename to appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp rename to appicon/element/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp rename to appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp b/appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp rename to appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp rename to appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.webp b/appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.webp rename to appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to appicon/element/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/app/src/nightly/res/drawable/ic_launcher_background.xml b/appicon/element/src/nightly/res/drawable/ic_launcher_background.xml similarity index 100% rename from app/src/nightly/res/drawable/ic_launcher_background.xml rename to appicon/element/src/nightly/res/drawable/ic_launcher_background.xml diff --git a/app/src/release/res/drawable/ic_launcher_background.xml b/appicon/element/src/release/res/drawable/ic_launcher_background.xml similarity index 100% rename from app/src/release/res/drawable/ic_launcher_background.xml rename to appicon/element/src/release/res/drawable/ic_launcher_background.xml diff --git a/settings.gradle.kts b/settings.gradle.kts index 5758d7a47e..5aee1e207c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -71,6 +71,8 @@ rootProject.name = "ElementX" include(":app") include(":appnav") include(":appconfig") +include(":appicon:element") +// TODO include(":appicon:enterprise") include(":tests:konsist") include(":tests:uitests") include(":tests:testutils")