diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..d89eb58f
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "spotiflyer-ios"]
+ path = spotiflyer-ios
+ url = https://github.com/Shabinder/spotiflyer-ios
diff --git a/android/build.gradle.kts b/android/build.gradle.kts
index 6a6e1189..09812f1a 100644
--- a/android/build.gradle.kts
+++ b/android/build.gradle.kts
@@ -64,7 +64,7 @@ android {
buildTypes {
getByName("release") {
isMinifyEnabled = true
- isShrinkResources = true
+ // isShrinkResources = true
if(props.containsKey("storeFileDir")){
signingConfig = signingConfigs.getByName("release")
}
@@ -77,7 +77,7 @@ android {
}
compileOptions {
// Flag to enable support for the new language APIs
- coreLibraryDesugaringEnabled = true
+ isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 0384b3d5..89121075 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -27,7 +27,6 @@
-
diff --git a/android/src/main/java/com/shabinder/spotiflyer/ui/AnalyticsDialog.kt b/android/src/main/java/com/shabinder/spotiflyer/ui/AnalyticsDialog.kt
index 8161ea27..8453cea3 100644
--- a/android/src/main/java/com/shabinder/spotiflyer/ui/AnalyticsDialog.kt
+++ b/android/src/main/java/com/shabinder/spotiflyer/ui/AnalyticsDialog.kt
@@ -26,7 +26,7 @@ import com.shabinder.common.uikit.SpotiFlyerShapes
import com.shabinder.common.uikit.SpotiFlyerTypography
import com.shabinder.common.uikit.colorPrimary
-@OptIn(ExperimentalAnimationApi::class)
+@ExperimentalAnimationApi
@Composable
fun AnalyticsDialog(
isVisible:Boolean,
diff --git a/build.gradle.kts b/build.gradle.kts
index 96ff81b9..9c115950 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -35,4 +35,9 @@ allprojects {
useIR = true
}
}
+ afterEvaluate {
+ project.extensions.findByType()?.let { kmpExt ->
+ kmpExt.sourceSets.removeAll { it.name == "androidAndroidTestRelease" }
+ }
+ }
}
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index f06b2392..4a77c1c8 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -19,7 +19,6 @@ plugins {
}
group = "com.shabinder"
-version = "2.1"
repositories {
google()
@@ -31,7 +30,7 @@ repositories {
}
dependencies {
- implementation("com.android.tools.build:gradle:4.0.2")
+ implementation("com.android.tools.build:gradle:7.1.0-alpha01")
implementation("org.jlleitschuh.gradle:ktlint-gradle:${Versions.ktLint}")
implementation(JetBrains.Compose.gradlePlugin)
implementation(JetBrains.Kotlin.gradlePlugin)
@@ -39,10 +38,6 @@ dependencies {
implementation(SqlDelight.gradlePlugin)
}
-kotlinDslPluginOptions {
- experimentalWarning.set(false)
-}
-
kotlin {
// Add Deps to compilation, so it will become available in main project
sourceSets.getByName("main").kotlin.srcDir("buildSrc/src/main/kotlin")
diff --git a/buildSrc/src/main/kotlin/android-setup.gradle.kts b/buildSrc/src/main/kotlin/android-setup.gradle.kts
index f33828a0..59a49b17 100644
--- a/buildSrc/src/main/kotlin/android-setup.gradle.kts
+++ b/buildSrc/src/main/kotlin/android-setup.gradle.kts
@@ -1,18 +1,20 @@
+@file:Suppress("UnstableApiUsage")
+
/*
- * * Copyright (c) 2021 Shabinder Singh
- * * This program is free software: you can redistribute it and/or modify
- * * it under the terms of the GNU General Public License as published by
- * * the Free Software Foundation, either version 3 of the License, or
- * * (at your option) any later version.
- * *
- * * This program is distributed in the hope that it will be useful,
- * * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * * GNU General Public License for more details.
- * *
- * * You should have received a copy of the GNU General Public License
- * * along with this program. If not, see .
- */
+* * Copyright (c) 2021 Shabinder Singh
+* * This program is free software: you can redistribute it and/or modify
+* * it under the terms of the GNU General Public License as published by
+* * the Free Software Foundation, either version 3 of the License, or
+* * (at your option) any later version.
+* *
+* * This program is distributed in the hope that it will be useful,
+* * but WITHOUT ANY WARRANTY; without even the implied warranty of
+* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* * GNU General Public License for more details.
+* *
+* * You should have received a copy of the GNU General Public License
+* * along with this program. If not, see .
+*/
plugins {
id("com.android.library")
@@ -20,11 +22,11 @@ plugins {
}
android {
- compileSdkVersion(29)
+ compileSdk = (29)
defaultConfig {
- minSdkVersion(Versions.minSdkVersion)
- targetSdkVersion(Versions.targetSdkVersion)
+ minSdk = (Versions.minSdkVersion)
+ targetSdk = (Versions.targetSdkVersion)
}
compileOptions {
diff --git a/buildSrc/src/main/kotlin/multiplatform-compose-setup.gradle.kts b/buildSrc/src/main/kotlin/multiplatform-compose-setup.gradle.kts
index c4fd373a..bf11524e 100644
--- a/buildSrc/src/main/kotlin/multiplatform-compose-setup.gradle.kts
+++ b/buildSrc/src/main/kotlin/multiplatform-compose-setup.gradle.kts
@@ -22,6 +22,17 @@ plugins {
id("ktlint-setup")
}
+android {
+ configurations {
+ create("androidTestApi")
+ create("androidTestDebugApi")
+ create("androidTestReleaseApi")
+ create("testApi")
+ create("testDebugApi")
+ create("testReleaseApi")
+ }
+}
+
kotlin {
jvm("desktop").compilations.all {
kotlinOptions {
@@ -55,14 +66,12 @@ kotlin {
}
}
}
-
named("androidMain") {
dependencies {
- implementation("androidx.appcompat:appcompat:1.2.0")
+ implementation("androidx.appcompat:appcompat:1.3.0")
implementation(Androidx.core)
}
}
-
named("desktopMain") {
dependencies {
implementation(compose.desktop.common)
diff --git a/buildSrc/src/main/kotlin/multiplatform-setup-test.gradle.kts b/buildSrc/src/main/kotlin/multiplatform-setup-test.gradle.kts
index d6ec5b69..3ba1b6c2 100644
--- a/buildSrc/src/main/kotlin/multiplatform-setup-test.gradle.kts
+++ b/buildSrc/src/main/kotlin/multiplatform-setup-test.gradle.kts
@@ -17,11 +17,9 @@
plugins {
id("com.android.library")
id("kotlin-multiplatform")
- id("ktlint-setup")
}
kotlin {
-
/*IOS Target Can be only built on Mac*/
if(HostOS.isMac){
val sdkName: String? = System.getenv("SDK_NAME")
@@ -43,7 +41,8 @@ kotlin {
useIR = true
}
}
- js() {
+
+ js {
/*
* TODO Enable JS IR Compiler
* waiting for Decompose & MVI Kotlin to support same
@@ -78,4 +77,4 @@ kotlin {
tasks.withType {
kotlinOptions.jvmTarget = "1.8"
}
-}
+}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/multiplatform-setup.gradle.kts b/buildSrc/src/main/kotlin/multiplatform-setup.gradle.kts
index aff8f7bb..df4df9fb 100644
--- a/buildSrc/src/main/kotlin/multiplatform-setup.gradle.kts
+++ b/buildSrc/src/main/kotlin/multiplatform-setup.gradle.kts
@@ -22,8 +22,18 @@ plugins {
id("kotlin-parcelize")
}
-kotlin {
+android {
+ configurations {
+ create("androidTestApi")
+ create("androidTestDebugApi")
+ create("androidTestReleaseApi")
+ create("testApi")
+ create("testDebugApi")
+ create("testReleaseApi")
+ }
+}
+kotlin {
/*IOS Target Can be only built on Mac*/
if(HostOS.isMac){
val sdkName: String? = System.getenv("SDK_NAME")
@@ -45,7 +55,7 @@ kotlin {
useIR = true
}
}
- js() {
+ js {
/*
* TODO Enable JS IR Compiler
* waiting for Decompose & MVI Kotlin to support same
diff --git a/common/compose/build.gradle.kts b/common/compose/build.gradle.kts
index a63505ec..f955a143 100644
--- a/common/compose/build.gradle.kts
+++ b/common/compose/build.gradle.kts
@@ -17,12 +17,15 @@
import org.jetbrains.compose.compose
plugins {
- id("multiplatform-compose-setup")
id("android-setup")
+ id("multiplatform-compose-setup")
}
kotlin {
sourceSets {
+ all {
+ languageSettings.useExperimentalAnnotation("androidx.compose.animation")
+ }
commonMain {
dependencies {
implementation(compose.materialIconsExtended)
@@ -35,5 +38,24 @@ kotlin {
implementation(Decompose.extensionsCompose)
}
}
+
+ // Testing Source-sets
+ named("commonTest") {
+ dependencies {
+ implementation(JetBrains.Kotlin.testCommon)
+ implementation(JetBrains.Kotlin.testAnnotationsCommon)
+ }
+ }
+
+ named("androidTest") {
+ dependencies {
+ implementation(JetBrains.Kotlin.testJunit)
+ }
+ }
+ named("desktopTest") {
+ dependencies {
+ implementation(JetBrains.Kotlin.testJunit)
+ }
+ }
}
}
diff --git a/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerListUi.kt b/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerListUi.kt
index 782ff989..228b0e0f 100644
--- a/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerListUi.kt
+++ b/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerListUi.kt
@@ -88,7 +88,7 @@ fun SpotiFlyerListContent(
item {
CoverImage(result.title, result.coverUrl, component::loadImage)
}
- itemsIndexed(model.trackList) { index, item ->
+ itemsIndexed(model.trackList) { _, item ->
TrackCard(
track = item,
downloadTrack = { component.onDownloadClicked(item) },
diff --git a/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerMainUi.kt b/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerMainUi.kt
index c427aeaf..d506a073 100644
--- a/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerMainUi.kt
+++ b/common/compose/src/commonMain/kotlin/com/shabinder/common/uikit/SpotiFlyerMainUi.kt
@@ -128,7 +128,7 @@ fun HomeTabBar(
TabRow(
selectedTabIndex = selectedIndex,
- indicator = indicator as @Composable (List) -> Unit,
+ indicator = indicator,
modifier = modifier,
) {
categories.forEachIndexed { index, category ->
diff --git a/common/data-models/build.gradle.kts b/common/data-models/build.gradle.kts
index 967da38e..65775562 100644
--- a/common/data-models/build.gradle.kts
+++ b/common/data-models/build.gradle.kts
@@ -15,8 +15,9 @@
*/
plugins {
- id("multiplatform-setup")
id("android-setup")
+ id("multiplatform-setup")
+ id("multiplatform-setup-test")
id("kotlin-parcelize")
kotlin("plugin.serialization")
}
@@ -46,10 +47,7 @@ kotlin {
}
}
androidMain {
- dependencies {
- api("com.github.K1rakishou:Fuck-Storage-Access-Framework:v1.1")
- api("androidx.documentfile:documentfile:1.0.1")
- }
+ dependencies {}
}
}
}
diff --git a/common/database/build.gradle.kts b/common/database/build.gradle.kts
index de772926..45fc19bb 100644
--- a/common/database/build.gradle.kts
+++ b/common/database/build.gradle.kts
@@ -15,8 +15,9 @@
*/
plugins {
- id("multiplatform-setup")
id("android-setup")
+ id("multiplatform-setup")
+ id("multiplatform-setup-test")
id("com.squareup.sqldelight")
}
diff --git a/common/dependency-injection/build.gradle.kts b/common/dependency-injection/build.gradle.kts
index 3b742493..bada07d1 100644
--- a/common/dependency-injection/build.gradle.kts
+++ b/common/dependency-injection/build.gradle.kts
@@ -17,8 +17,9 @@
import org.jetbrains.compose.compose
plugins {
- id("multiplatform-setup")
id("android-setup")
+ id("multiplatform-setup")
+ id("multiplatform-setup-test")
kotlin("plugin.serialization")
}
diff --git a/common/list/build.gradle.kts b/common/list/build.gradle.kts
index 4320b1dd..329a5b62 100644
--- a/common/list/build.gradle.kts
+++ b/common/list/build.gradle.kts
@@ -15,8 +15,9 @@
*/
plugins {
- id("multiplatform-setup")
id("android-setup")
+ id("multiplatform-setup")
+ id("multiplatform-setup-test")
id("kotlin-parcelize")
}
diff --git a/common/main/build.gradle.kts b/common/main/build.gradle.kts
index 4320b1dd..329a5b62 100644
--- a/common/main/build.gradle.kts
+++ b/common/main/build.gradle.kts
@@ -15,8 +15,9 @@
*/
plugins {
- id("multiplatform-setup")
id("android-setup")
+ id("multiplatform-setup")
+ id("multiplatform-setup-test")
id("kotlin-parcelize")
}
diff --git a/common/root/build.gradle.kts b/common/root/build.gradle.kts
index f1fd6224..12365d43 100644
--- a/common/root/build.gradle.kts
+++ b/common/root/build.gradle.kts
@@ -15,8 +15,9 @@
*/
plugins {
- id("multiplatform-setup")
id("android-setup")
+ id("multiplatform-setup")
+ id("multiplatform-setup-test")
id("kotlin-parcelize")
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 87e87435..4e77d0c2 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionSha256Sum=e2774e6fb77c43657decde25542dea710aafd78c4022d19b196e7e78d79d8c6c
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
+distributionSha256Sum=0e46229820205440b48a5501122002842b82886e76af35f0f3a069243dca4b3c
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 3c4d7efa..0c54a1fa 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -15,7 +15,6 @@
*/
rootProject.name = "spotiflyer"
-enableFeaturePreview("GRADLE_METADATA")
include(
":common:database",
@@ -25,7 +24,6 @@ include(
":common:list",
":common:data-models",
":common:dependency-injection",
- ":fuzzywuzzy:app",
":android",
":desktop",
":web-app",
diff --git a/spotiflyer-ios b/spotiflyer-ios
new file mode 160000
index 00000000..30c16869
--- /dev/null
+++ b/spotiflyer-ios
@@ -0,0 +1 @@
+Subproject commit 30c16869ebc81aace8a21cc0ecb0f0314f72b0bc