From 840d9c91fc58dc9eb183cb23532d76fa48faf9e7 Mon Sep 17 00:00:00 2001 From: Alishen Date: Thu, 12 Oct 2023 18:40:35 +0200 Subject: [PATCH] Fdroid Inclusion Policy changes --- zeapp/android/build.gradle.kts | 11 ----------- .../main/java/de/berlindroid/zeapp/ZeMainActivity.kt | 2 +- .../berlindroid/zeapp/zebits/ZeBitmapManipulation.kt | 2 -- .../de/berlindroid/zeapp/zemodels/ZeConfiguration.kt | 5 +++-- .../zeapp/zeservices/ZePreferencesService.kt | 6 +++--- .../java/de/berlindroid/zeapp/zeui/ZeCameraEditor.kt | 2 +- .../berlindroid/zeapp/zeui/ZeImageDrawEditorDialog.kt | 2 +- .../de/berlindroid/zeapp/zeui/zepages/ZeNamePage.kt | 2 +- .../zeapp/zevm/GetTemplateConfigurations.kt | 2 +- .../de/berlindroid/zeapp/zevm/ZeBadgeViewModel.kt | 2 +- zeapp/build.gradle.kts | 3 --- zeapp/gradle/libs.versions.toml | 10 ---------- 12 files changed, 12 insertions(+), 37 deletions(-) diff --git a/zeapp/android/build.gradle.kts b/zeapp/android/build.gradle.kts index 331bdbce..893fb773 100644 --- a/zeapp/android/build.gradle.kts +++ b/zeapp/android/build.gradle.kts @@ -9,9 +9,6 @@ plugins { alias(libs.plugins.detekt.gradle) alias(libs.plugins.dagger.hilt) alias(libs.plugins.kotlin.kapt) - alias(libs.plugins.google.play.services) - alias(libs.plugins.firebase.appdistribution) - alias(libs.plugins.firebase.crashlytics) alias(libs.plugins.license.report.gradle) alias(libs.plugins.baselineprofile) } @@ -84,11 +81,6 @@ android { "OPEN_API_TOKEN", "\"${System.getenv("DALE2_TOKEN")}\"" ?: "\"\"", ) - - firebaseAppDistribution { - releaseNotesFile = "./release-notes.txt" - groups = "testers" - } } create("benchmark") { signingConfig = signingConfigs.getByName("debug") @@ -185,9 +177,6 @@ dependencies { implementation(libs.dagger.hilt) implementation(libs.coil.compose) implementation(libs.coil.transformations) - implementation(platform(libs.firebase)) - implementation(libs.firebase.analytics) - implementation(libs.firebase.crashlytics) implementation(libs.timber) debugImplementation(libs.androidx.compose.ui.tooling) debugImplementation(libs.androidx.compose.ui.test.manifest) diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/ZeMainActivity.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/ZeMainActivity.kt index 1c236af1..2a7fb141 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/ZeMainActivity.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/ZeMainActivity.kt @@ -250,7 +250,7 @@ private fun ZeAbout( fontSize = 24.sp, ) ZeText( - text = "Running on '${getPlatform()}'." + text = "Running on '${getPlatform()}'.", ) ZeLazyColumn { items(lines) { line -> diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zebits/ZeBitmapManipulation.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zebits/ZeBitmapManipulation.kt index 6d1b690d..5d6ed2e9 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zebits/ZeBitmapManipulation.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zebits/ZeBitmapManipulation.kt @@ -23,7 +23,6 @@ import java.nio.ByteBuffer import java.nio.IntBuffer import kotlin.experimental.and - /** * Render a composable into a bitmap. * @@ -337,4 +336,3 @@ private fun Bitmap.crop(fromX: Int, fromY: Int, targetWidth: Int, targetHeight: canvas.drawBitmap(this, fromX.toFloat(), fromY.toFloat(), null) return result } - diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zemodels/ZeConfiguration.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zemodels/ZeConfiguration.kt index 07bd6630..7724d934 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zemodels/ZeConfiguration.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zemodels/ZeConfiguration.kt @@ -14,7 +14,8 @@ enum class ZeBadgeType(val rawValue: String) { CAMERA("Camera"), IMAGE_DRAWING("Image Drawing"), BARCODE_TAG("BarCode Tag"), - PHRASE("Custom Phrase"); + PHRASE("Custom Phrase"), + ; companion object { fun getOrNull(type: String): ZeBadgeType? { @@ -150,7 +151,7 @@ sealed class ZeConfiguration( data class CustomPhrase( val phrase: String, - override val bitmap: Bitmap + override val bitmap: Bitmap, ) : ZeConfiguration(ZeBadgeType.PHRASE, humanTitle = ZeBadgeType.PHRASE.rawValue, bitmap) // TODO: Add your own pages. diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeservices/ZePreferencesService.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeservices/ZePreferencesService.kt index ce56e94c..4ada1f48 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeservices/ZePreferencesService.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeservices/ZePreferencesService.kt @@ -10,14 +10,14 @@ import androidx.datastore.preferences.preferencesDataStore import dagger.hilt.android.qualifiers.ApplicationContext import de.berlindroid.zeapp.PAGE_HEIGHT import de.berlindroid.zeapp.PAGE_WIDTH -import de.berlindroid.zekompanion.base64 -import de.berlindroid.zekompanion.debase64 -import de.berlindroid.zekompanion.toBinary import de.berlindroid.zeapp.zebits.toBitmap import de.berlindroid.zeapp.zemodels.ZeBadgeType import de.berlindroid.zeapp.zemodels.ZeConfiguration import de.berlindroid.zeapp.zemodels.ZeSlot import de.berlindroid.zeapp.zeui.pixelBuffer +import de.berlindroid.zekompanion.base64 +import de.berlindroid.zekompanion.debase64 +import de.berlindroid.zekompanion.toBinary import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.firstOrNull import kotlinx.coroutines.flow.map diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeCameraEditor.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeCameraEditor.kt index b87d0774..a0d65796 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeCameraEditor.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeCameraEditor.kt @@ -20,10 +20,10 @@ import com.commit451.coiltransformations.CropTransformation import de.berlindroid.zeapp.BuildConfig import de.berlindroid.zeapp.PAGE_HEIGHT import de.berlindroid.zeapp.PAGE_WIDTH -import de.berlindroid.zekompanion.ditherFloydSteinberg import de.berlindroid.zeapp.zemodels.ZeConfiguration import de.berlindroid.zeapp.zemodels.ZeEditor import de.berlindroid.zeapp.zevm.ZeBadgeViewModel +import de.berlindroid.zekompanion.ditherFloydSteinberg import kotlinx.coroutines.launch import java.io.File diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeImageDrawEditorDialog.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeImageDrawEditorDialog.kt index d5ce3f2a..87751f80 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeImageDrawEditorDialog.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/ZeImageDrawEditorDialog.kt @@ -39,8 +39,8 @@ import de.berlindroid.zeapp.PAGE_WIDTH import de.berlindroid.zeapp.R import de.berlindroid.zeapp.zebits.isBinary import de.berlindroid.zeapp.zebits.scaleIfNeeded -import de.berlindroid.zekompanion.threshold import de.berlindroid.zeapp.zemodels.ZeConfiguration +import de.berlindroid.zekompanion.threshold import kotlinx.coroutines.launch /** diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/zepages/ZeNamePage.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/zepages/ZeNamePage.kt index b9c8565c..434bc078 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/zepages/ZeNamePage.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zeui/zepages/ZeNamePage.kt @@ -84,7 +84,7 @@ fun NamePage( if (result.didOverflowWidth) { secondarySize /= 3.0f } - } + }, ) } } diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/GetTemplateConfigurations.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/GetTemplateConfigurations.kt index 5a4400da..51b8077f 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/GetTemplateConfigurations.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/GetTemplateConfigurations.kt @@ -2,10 +2,10 @@ package de.berlindroid.zeapp.zevm import android.graphics.Bitmap import de.berlindroid.zeapp.R -import de.berlindroid.zekompanion.ditherFloydSteinberg import de.berlindroid.zeapp.zemodels.ZeConfiguration import de.berlindroid.zeapp.zeservices.ZeImageProviderService import de.berlindroid.zeapp.zeui.pixelManipulation +import de.berlindroid.zekompanion.ditherFloydSteinberg import javax.inject.Inject class GetTemplateConfigurations @Inject constructor( diff --git a/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/ZeBadgeViewModel.kt b/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/ZeBadgeViewModel.kt index 803949af..f666a04d 100644 --- a/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/ZeBadgeViewModel.kt +++ b/zeapp/android/src/main/java/de/berlindroid/zeapp/zevm/ZeBadgeViewModel.kt @@ -8,7 +8,6 @@ import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel import de.berlindroid.zeapp.OPENAI_API_KEY import de.berlindroid.zeapp.R -import de.berlindroid.zekompanion.ditherFloydSteinberg import de.berlindroid.zeapp.zebits.isBinary import de.berlindroid.zeapp.zemodels.ZeConfiguration import de.berlindroid.zeapp.zemodels.ZeEditor @@ -20,6 +19,7 @@ import de.berlindroid.zeapp.zeservices.ZeContributorsService import de.berlindroid.zeapp.zeservices.ZeImageProviderService import de.berlindroid.zeapp.zeservices.ZePreferencesService import de.berlindroid.zeapp.zeui.pixelManipulation +import de.berlindroid.zekompanion.ditherFloydSteinberg import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job import kotlinx.coroutines.delay diff --git a/zeapp/build.gradle.kts b/zeapp/build.gradle.kts index 2c26cedb..2582a315 100644 --- a/zeapp/build.gradle.kts +++ b/zeapp/build.gradle.kts @@ -6,9 +6,6 @@ plugins { alias(libs.plugins.kotlin.kapt) apply false alias(libs.plugins.detekt.gradle) apply false alias(libs.plugins.dagger.hilt) apply false - alias(libs.plugins.google.play.services) apply false - alias(libs.plugins.firebase.appdistribution) apply false - alias(libs.plugins.firebase.crashlytics) apply false alias(libs.plugins.license.report.gradle) apply false id("com.android.test") version "8.0.2" apply false kotlin("multiplatform").version("1.8.21").apply(false) diff --git a/zeapp/gradle/libs.versions.toml b/zeapp/gradle/libs.versions.toml index 1ed2ac21..29f2afa3 100644 --- a/zeapp/gradle/libs.versions.toml +++ b/zeapp/gradle/libs.versions.toml @@ -7,9 +7,6 @@ android-library = { id = "com.android.library", version.ref = "android-gradle-pl baselineprofile = { id = "androidx.baselineprofile", version.ref = "benchmark"} dagger-hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger-hilt" } detekt-gradle = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt-gradle" } -firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } -firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } -google-play-services = { id = "com.google.gms.google-services", version.ref = "google-play-services" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } ktlint-gradle = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-gradle" } @@ -31,10 +28,6 @@ core-ktx = "1.10.1" dagger-hilt = "2.46.1" detekt-gradle = "1.23.0" espresso-core = "3.5.1" -firebase = "32.2.3" -firebase-appdistribution = "4.0.0" -firebase-crashlytics = "2.9.6" -google-play-services = "4.3.15" jSerialComm = "2.10.3" junit = "4.13.2" kotlin = "1.9.0" @@ -69,9 +62,6 @@ core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx dagger-hilt = { module = "com.google.dagger:hilt-android", version.ref = "dagger-hilt" } dagger-hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "dagger-hilt" } espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" } -firebase = { module = "com.google.firebase:firebase-bom", version.ref = "firebase" } -firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" } -firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx" } jSerialComm = { module = "com.fazecast:jSerialComm", version.ref = "jSerialComm" } junit = { group = "junit", name = "junit", version.ref = "junit" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }