IOS Submodule conf. , AndroidManifest useless permission removed, gradle updated and cleanup

This commit is contained in:
shabinder 2021-05-20 21:37:54 +05:30
parent 74aabebd66
commit 5c1c4eaf13
22 changed files with 99 additions and 53 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "spotiflyer-ios"]
path = spotiflyer-ios
url = https://github.com/Shabinder/spotiflyer-ios

View File

@ -64,7 +64,7 @@ android {
buildTypes { buildTypes {
getByName("release") { getByName("release") {
isMinifyEnabled = true isMinifyEnabled = true
isShrinkResources = true // isShrinkResources = true
if(props.containsKey("storeFileDir")){ if(props.containsKey("storeFileDir")){
signingConfig = signingConfigs.getByName("release") signingConfig = signingConfigs.getByName("release")
} }
@ -77,7 +77,7 @@ android {
} }
compileOptions { compileOptions {
// Flag to enable support for the new language APIs // Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled = true isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
} }

View File

@ -27,7 +27,6 @@
</queries> </queries>
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

View File

@ -26,7 +26,7 @@ import com.shabinder.common.uikit.SpotiFlyerShapes
import com.shabinder.common.uikit.SpotiFlyerTypography import com.shabinder.common.uikit.SpotiFlyerTypography
import com.shabinder.common.uikit.colorPrimary import com.shabinder.common.uikit.colorPrimary
@OptIn(ExperimentalAnimationApi::class) @ExperimentalAnimationApi
@Composable @Composable
fun AnalyticsDialog( fun AnalyticsDialog(
isVisible:Boolean, isVisible:Boolean,

View File

@ -35,4 +35,9 @@ allprojects {
useIR = true useIR = true
} }
} }
afterEvaluate {
project.extensions.findByType<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension>()?.let { kmpExt ->
kmpExt.sourceSets.removeAll { it.name == "androidAndroidTestRelease" }
}
}
} }

View File

@ -19,7 +19,6 @@ plugins {
} }
group = "com.shabinder" group = "com.shabinder"
version = "2.1"
repositories { repositories {
google() google()
@ -31,7 +30,7 @@ repositories {
} }
dependencies { 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("org.jlleitschuh.gradle:ktlint-gradle:${Versions.ktLint}")
implementation(JetBrains.Compose.gradlePlugin) implementation(JetBrains.Compose.gradlePlugin)
implementation(JetBrains.Kotlin.gradlePlugin) implementation(JetBrains.Kotlin.gradlePlugin)
@ -39,10 +38,6 @@ dependencies {
implementation(SqlDelight.gradlePlugin) implementation(SqlDelight.gradlePlugin)
} }
kotlinDslPluginOptions {
experimentalWarning.set(false)
}
kotlin { kotlin {
// Add Deps to compilation, so it will become available in main project // Add Deps to compilation, so it will become available in main project
sourceSets.getByName("main").kotlin.srcDir("buildSrc/src/main/kotlin") sourceSets.getByName("main").kotlin.srcDir("buildSrc/src/main/kotlin")

View File

@ -1,18 +1,20 @@
@file:Suppress("UnstableApiUsage")
/* /*
* * Copyright (c) 2021 Shabinder Singh * * Copyright (c) 2021 Shabinder Singh
* * This program is free software: you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by
* * the Free Software Foundation, either version 3 of the License, or * * the Free Software Foundation, either version 3 of the License, or
* * (at your option) any later version. * * (at your option) any later version.
* * * *
* * This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful,
* * but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details. * * GNU General Public License for more details.
* * * *
* * You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License
* * along with this program. If not, see <https://www.gnu.org/licenses/>. * * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
plugins { plugins {
id("com.android.library") id("com.android.library")
@ -20,11 +22,11 @@ plugins {
} }
android { android {
compileSdkVersion(29) compileSdk = (29)
defaultConfig { defaultConfig {
minSdkVersion(Versions.minSdkVersion) minSdk = (Versions.minSdkVersion)
targetSdkVersion(Versions.targetSdkVersion) targetSdk = (Versions.targetSdkVersion)
} }
compileOptions { compileOptions {

View File

@ -22,6 +22,17 @@ plugins {
id("ktlint-setup") id("ktlint-setup")
} }
android {
configurations {
create("androidTestApi")
create("androidTestDebugApi")
create("androidTestReleaseApi")
create("testApi")
create("testDebugApi")
create("testReleaseApi")
}
}
kotlin { kotlin {
jvm("desktop").compilations.all { jvm("desktop").compilations.all {
kotlinOptions { kotlinOptions {
@ -55,14 +66,12 @@ kotlin {
} }
} }
} }
named("androidMain") { named("androidMain") {
dependencies { dependencies {
implementation("androidx.appcompat:appcompat:1.2.0") implementation("androidx.appcompat:appcompat:1.3.0")
implementation(Androidx.core) implementation(Androidx.core)
} }
} }
named("desktopMain") { named("desktopMain") {
dependencies { dependencies {
implementation(compose.desktop.common) implementation(compose.desktop.common)

View File

@ -17,11 +17,9 @@
plugins { plugins {
id("com.android.library") id("com.android.library")
id("kotlin-multiplatform") id("kotlin-multiplatform")
id("ktlint-setup")
} }
kotlin { kotlin {
/*IOS Target Can be only built on Mac*/ /*IOS Target Can be only built on Mac*/
if(HostOS.isMac){ if(HostOS.isMac){
val sdkName: String? = System.getenv("SDK_NAME") val sdkName: String? = System.getenv("SDK_NAME")
@ -43,7 +41,8 @@ kotlin {
useIR = true useIR = true
} }
} }
js() {
js {
/* /*
* TODO Enable JS IR Compiler * TODO Enable JS IR Compiler
* waiting for Decompose & MVI Kotlin to support same * waiting for Decompose & MVI Kotlin to support same
@ -78,4 +77,4 @@ kotlin {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
} }
} }

View File

@ -22,8 +22,18 @@ plugins {
id("kotlin-parcelize") 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*/ /*IOS Target Can be only built on Mac*/
if(HostOS.isMac){ if(HostOS.isMac){
val sdkName: String? = System.getenv("SDK_NAME") val sdkName: String? = System.getenv("SDK_NAME")
@ -45,7 +55,7 @@ kotlin {
useIR = true useIR = true
} }
} }
js() { js {
/* /*
* TODO Enable JS IR Compiler * TODO Enable JS IR Compiler
* waiting for Decompose & MVI Kotlin to support same * waiting for Decompose & MVI Kotlin to support same

View File

@ -17,12 +17,15 @@
import org.jetbrains.compose.compose import org.jetbrains.compose.compose
plugins { plugins {
id("multiplatform-compose-setup")
id("android-setup") id("android-setup")
id("multiplatform-compose-setup")
} }
kotlin { kotlin {
sourceSets { sourceSets {
all {
languageSettings.useExperimentalAnnotation("androidx.compose.animation")
}
commonMain { commonMain {
dependencies { dependencies {
implementation(compose.materialIconsExtended) implementation(compose.materialIconsExtended)
@ -35,5 +38,24 @@ kotlin {
implementation(Decompose.extensionsCompose) 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)
}
}
} }
} }

View File

@ -88,7 +88,7 @@ fun SpotiFlyerListContent(
item { item {
CoverImage(result.title, result.coverUrl, component::loadImage) CoverImage(result.title, result.coverUrl, component::loadImage)
} }
itemsIndexed(model.trackList) { index, item -> itemsIndexed(model.trackList) { _, item ->
TrackCard( TrackCard(
track = item, track = item,
downloadTrack = { component.onDownloadClicked(item) }, downloadTrack = { component.onDownloadClicked(item) },

View File

@ -128,7 +128,7 @@ fun HomeTabBar(
TabRow( TabRow(
selectedTabIndex = selectedIndex, selectedTabIndex = selectedIndex,
indicator = indicator as @Composable (List<TabPosition>) -> Unit, indicator = indicator,
modifier = modifier, modifier = modifier,
) { ) {
categories.forEachIndexed { index, category -> categories.forEachIndexed { index, category ->

View File

@ -15,8 +15,9 @@
*/ */
plugins { plugins {
id("multiplatform-setup")
id("android-setup") id("android-setup")
id("multiplatform-setup")
id("multiplatform-setup-test")
id("kotlin-parcelize") id("kotlin-parcelize")
kotlin("plugin.serialization") kotlin("plugin.serialization")
} }
@ -46,10 +47,7 @@ kotlin {
} }
} }
androidMain { androidMain {
dependencies { dependencies {}
api("com.github.K1rakishou:Fuck-Storage-Access-Framework:v1.1")
api("androidx.documentfile:documentfile:1.0.1")
}
} }
} }
} }

View File

@ -15,8 +15,9 @@
*/ */
plugins { plugins {
id("multiplatform-setup")
id("android-setup") id("android-setup")
id("multiplatform-setup")
id("multiplatform-setup-test")
id("com.squareup.sqldelight") id("com.squareup.sqldelight")
} }

View File

@ -17,8 +17,9 @@
import org.jetbrains.compose.compose import org.jetbrains.compose.compose
plugins { plugins {
id("multiplatform-setup")
id("android-setup") id("android-setup")
id("multiplatform-setup")
id("multiplatform-setup-test")
kotlin("plugin.serialization") kotlin("plugin.serialization")
} }

View File

@ -15,8 +15,9 @@
*/ */
plugins { plugins {
id("multiplatform-setup")
id("android-setup") id("android-setup")
id("multiplatform-setup")
id("multiplatform-setup-test")
id("kotlin-parcelize") id("kotlin-parcelize")
} }

View File

@ -15,8 +15,9 @@
*/ */
plugins { plugins {
id("multiplatform-setup")
id("android-setup") id("android-setup")
id("multiplatform-setup")
id("multiplatform-setup-test")
id("kotlin-parcelize") id("kotlin-parcelize")
} }

View File

@ -15,8 +15,9 @@
*/ */
plugins { plugins {
id("multiplatform-setup")
id("android-setup") id("android-setup")
id("multiplatform-setup")
id("multiplatform-setup-test")
id("kotlin-parcelize") id("kotlin-parcelize")
} }

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=e2774e6fb77c43657decde25542dea710aafd78c4022d19b196e7e78d79d8c6c distributionSha256Sum=0e46229820205440b48a5501122002842b82886e76af35f0f3a069243dca4b3c
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -15,7 +15,6 @@
*/ */
rootProject.name = "spotiflyer" rootProject.name = "spotiflyer"
enableFeaturePreview("GRADLE_METADATA")
include( include(
":common:database", ":common:database",
@ -25,7 +24,6 @@ include(
":common:list", ":common:list",
":common:data-models", ":common:data-models",
":common:dependency-injection", ":common:dependency-injection",
":fuzzywuzzy:app",
":android", ":android",
":desktop", ":desktop",
":web-app", ":web-app",

1
spotiflyer-ios Submodule

@ -0,0 +1 @@
Subproject commit 30c16869ebc81aace8a21cc0ecb0f0314f72b0bc