Skip to content

Commit

Permalink
Merge pull request #12 from Shahriyar13/main
Browse files Browse the repository at this point in the history
fix some error in new dependencies
  • Loading branch information
MohamedRejeb committed Jan 31, 2024
2 parents 89d2c64 + 687270f commit e13c46f
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 29 deletions.
25 changes: 20 additions & 5 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,47 @@ android {
}
buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = Versions.composeCompiler
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
pickFirsts.add(
"META-INF/INDEX.LIST"
)
excludes.addAll(
listOf(
"META-INF/AL2.0",
"META-INF/LGPL2.1",
),
)
}
}
buildTypes {

getByName("release") {
isMinifyEnabled = true
}

getByName("debug") {
isMinifyEnabled = false
}

}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "21"
jvmTarget = "11"
}
}

dependencies {
implementation(project(":shared"))
implementation("androidx.activity:activity-compose:1.8.0")
implementation(Deps.Androidx.Activity.activityCompose)

// Koin
with(Deps.Koin) {
Expand Down
10 changes: 10 additions & 0 deletions buildSrc/src/main/java/com/mocoding/pokedex/Deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ object Deps {
}
}

object Androidx {
object Activity {
const val activityCompose = "androidx.activity:activity-compose:${Versions.activityCompose}"
}
}

object Io {
object Ktor {
const val ktorClientCore = "io.ktor:ktor-client-core:${Versions.ktor}"
Expand Down Expand Up @@ -74,4 +80,8 @@ object Deps {
object Github {
const val imageLoader = "io.github.qdsfdhvh:image-loader:${Versions.imageLoader}"
}

object Touchlab {
const val statelyCommon = "co.touchlab:stately-common:${Versions.touchlab}"
}
}
4 changes: 3 additions & 1 deletion buildSrc/src/main/java/com/mocoding/pokedex/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.mocoding.pokedex
object Versions {
const val gradlePlugin = "8.1.3"
const val kotlin = "1.9.20"
const val activityCompose = "1.8.0"
const val compose = "1.5.10"
const val composeCompiler = "1.5.4"
const val coroutines = "1.7.3"
Expand All @@ -14,6 +15,7 @@ object Versions {
const val sqlDelight = "2.0.0"
const val koin = "3.5.2-RC1"
const val imageLoader = "1.7.1"
const val logbackClassic = "1.4.11"
const val logbackClassic = "1.2.11" // Do not update it unless you read documentation of change, then all okHttps not works in android
const val kotlinWrappersBom = "1.0.0-pre.641"
const val touchlab = "2.0.5"
}
2 changes: 1 addition & 1 deletion desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version = "1.0.0-SNAPSHOT"

kotlin {
jvm {
jvmToolchain(21)
jvmToolchain(11)
withJava()
}
sourceSets {
Expand Down
47 changes: 25 additions & 22 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,33 @@ plugins {

@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
kotlin {
jvm("desktop")
jvm("desktop") {
jvmToolchain(11)
}

androidTarget{
compilations.all {
kotlinOptions {
jvmTarget = "21"
jvmTarget = "11"
}
}
}

listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64(),
).forEach { _ ->
cocoapods {
summary = "Pokedex the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0.0"
ios.deploymentTarget = "14.1"
podfile = project.file("../ios/Podfile")
framework {
baseName = "shared"
isStatic = true
export(Deps.ArkIvanov.Decompose.decompose)
export(Deps.ArkIvanov.Essenty.lifecycle)
}
iosX64()
iosArm64()
iosSimulatorArm64()

cocoapods {
summary = "Pokedex the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0.0"
ios.deploymentTarget = "14.1"
podfile = project.file("../ios/Podfile")
framework {
baseName = "shared"
isStatic = true
export(Deps.ArkIvanov.Decompose.decompose)
export(Deps.ArkIvanov.Essenty.lifecycle)
}
}

Expand Down Expand Up @@ -148,6 +148,9 @@ kotlin {

// SqlDelight
implementation(Deps.CashApp.SQLDelight.nativeDriver)

// TouchLab
implementation(Deps.Touchlab.statelyCommon)
}
}

Expand All @@ -165,7 +168,7 @@ kotlin {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "21"
kotlinOptions.jvmTarget = "11"
}
}

Expand All @@ -176,8 +179,8 @@ android {
minSdk = Configuration.minSdk
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

Expand Down

0 comments on commit e13c46f

Please sign in to comment.