Skip to content

Commit

Permalink
Merge pull request #662 from manuel-martos/upgrade-gradle-kotlin
Browse files Browse the repository at this point in the history
Upgrade Gradle & Kotlin
  • Loading branch information
mmartosdev authored Jan 23, 2024
2 parents 6c419cf + e190bc6 commit dfd4362
Show file tree
Hide file tree
Showing 19 changed files with 80 additions and 45 deletions.
4 changes: 1 addition & 3 deletions appyx-navigation/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ appyx {
dependencies {
val composeBom = platform(libs.compose.bom)

api(composeBom)
api(libs.kotlin.coroutines.android)

api(libs.compose.ui.tooling)

implementation(composeBom)
Expand All @@ -26,7 +24,7 @@ dependencies {
androidTestImplementation(composeBom)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.compose.ui.test.junit4)
androidTestImplementation(libs.compose.foundation)
androidTestImplementation(libs.compose.ui.test.junit4)
androidTestImplementation(project(":utils:testing-ui"))
}
1 change: 0 additions & 1 deletion appyx-navigation/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ android {
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.compose.ui.test.junit4)
androidTestImplementation(libs.compose.foundation)
androidTestImplementation(project(":utils:testing-ui"))
}
}
27 changes: 27 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ dependencyAnalysis {
all {
onIncorrectConfiguration {
severity("fail")

exclude(
// Should be ignored as it's raised in many modules due to misconfiguration.
"org.jetbrains.kotlin:kotlin-stdlib"
)
}
onUnusedDependencies {
severity("fail")
Expand All @@ -46,6 +51,12 @@ dependencyAnalysis {
// Convenience for convention plugins to avoid needing to define this.
"org.junit.jupiter:junit-jupiter-api",

// Some modules declare these dependencies but have not used them yet.
"androidx.compose.ui:ui-test-junit4",
"androidx.test.espresso:espresso-core",
"androidx.test.ext:junit",
":utils:testing-ui",

// This is used in:demos:appyx-interactions:android. But raised as unused.
"androidx.compose.material:material-icons-extended",
)
Expand All @@ -65,6 +76,22 @@ dependencyAnalysis {
exclude(":utils:testing-unit-common")
}
}
project(":utils:interop-ribs") {
onIncorrectConfiguration {
severity("fail")
exclude(
// Should be ignored, as they could potentially clash with dependencies
// from client code.
"com.github.badoo.RIBs:rib-compose",
)
}
onUnusedDependencies {
severity("fail")
exclude(
"androidx.activity:activity-compose",
)
}
}
}
}

Expand Down
7 changes: 0 additions & 7 deletions demos/appyx-interactions/ios/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ kotlin {
}
}

compose.experimental {
uikit.application {
projectName = "Appyx"
bundleIdPrefix = "com.bumble.appyx"
}
}

dependencies {
add("kspIosArm64", project(":ksp:appyx-processor"))
add("kspIosX64", project(":ksp:appyx-processor"))
Expand Down
11 changes: 11 additions & 0 deletions demos/appyx-interactions/ios/ios.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Pod::Spec.new do |spec|
spec.ios.deployment_target = '16.4'


if !Dir.exist?('build/cocoapods/framework/ios.framework') || Dir.empty?('build/cocoapods/framework/ios.framework')
raise "
Kotlin framework 'ios' doesn't exist yet, so a proper Xcode project can't be generated.
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
./gradlew :demos:appyx-interactions:ios:generateDummyFramework
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
end

spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':demos:appyx-interactions:ios',
'PRODUCT_MODULE_NAME' => 'ios',
Expand Down
4 changes: 2 additions & 2 deletions demos/appyx-interactions/iosApp/Configuration/Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TEAM_ID=
BUNDLE_ID=com.bumble.appyx.Appyx
APP_NAME=Appyx
BUNDLE_ID=com.bumble.appyx.interactions
APP_NAME=Appyx Interactions
7 changes: 0 additions & 7 deletions demos/appyx-navigation/ios/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ kotlin {
}
}

compose.experimental {
uikit.application {
projectName = "Appyx"
bundleIdPrefix = "com.bumble.appyx"
}
}

tasks.register<Copy>("copyResources") {
// Dirs containing files we want to copy
from("../common/src/commonMain/resources")
Expand Down
11 changes: 11 additions & 0 deletions demos/appyx-navigation/ios/ios.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Pod::Spec.new do |spec|
spec.ios.deployment_target = '17.0'


if !Dir.exist?('build/cocoapods/framework/ios.framework') || Dir.empty?('build/cocoapods/framework/ios.framework')
raise "
Kotlin framework 'ios' doesn't exist yet, so a proper Xcode project can't be generated.
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
./gradlew :demos:appyx-navigation:ios:generateDummyFramework
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
end

spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':demos:appyx-navigation:ios',
'PRODUCT_MODULE_NAME' => 'ios',
Expand Down
4 changes: 2 additions & 2 deletions demos/appyx-navigation/iosApp/Configuration/Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TEAM_ID=
BUNDLE_ID=com.bumble.appyx.Appyx
APP_NAME=Appyx
BUNDLE_ID=com.bumble.appyx.navigation
APP_NAME=Appyx Navigation
2 changes: 1 addition & 1 deletion demos/image-loader/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
5 changes: 2 additions & 3 deletions demos/navigation-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ appyx {
dependencies {
val composeBom = platform(libs.compose.bom)

api(composeBom)
api(project(":appyx-navigation:appyx-navigation"))
api(project(":appyx-components:stable:backstack:backstack"))
implementation(project(":appyx-navigation:appyx-navigation"))
implementation(project(":appyx-components:stable:backstack:backstack"))

implementation(composeBom)
implementation(libs.androidx.navigation.compose)
Expand Down
2 changes: 1 addition & 1 deletion demos/sandbox-appyx-navigation/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
7 changes: 0 additions & 7 deletions demos/sandbox-appyx-navigation/ios/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ kotlin {
}
}

compose.experimental {
uikit.application {
projectName = "Appyx"
bundleIdPrefix = "com.bumble.appyx"
}
}

dependencies {
add("kspIosArm64", project(":ksp:appyx-processor"))
add("kspIosX64", project(":ksp:appyx-processor"))
Expand Down
11 changes: 11 additions & 0 deletions demos/sandbox-appyx-navigation/ios/ios.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Pod::Spec.new do |spec|
spec.ios.deployment_target = '16.4'


if !Dir.exist?('build/cocoapods/framework/ios.framework') || Dir.empty?('build/cocoapods/framework/ios.framework')
raise "
Kotlin framework 'ios' doesn't exist yet, so a proper Xcode project can't be generated.
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
./gradlew :demos:sandbox-appyx-navigation:ios:generateDummyFramework
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
end

spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':demos:sandbox-appyx-navigation:ios',
'PRODUCT_MODULE_NAME' => 'ios',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TEAM_ID=
BUNDLE_ID=com.bumble.appyx.Appyx
APP_NAME=Appyx
BUNDLE_ID=com.bumble.appyx.sandbox
APP_NAME=Appyx Sandbox
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ android.nonTransitiveRClass=false
android.useAndroidX=true
kotlin.code.style=official
kotlin.mpp.androidSourceSetLayoutVersion1.nowarn=true
kotlin.mpp.applyDefaultHierarchyTemplate=false
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
library.version=2.0.0-alpha09
Expand Down
14 changes: 7 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

[versions]
accompanist = "0.28.0"
agp = "8.1.2"
agp = "8.2.1"
androidCompileSdk = "34"
androidMinSdk = "21"
androidTargetSdk = "32"
androidx-lifecycle = "2.6.1"
androidx-navigation-compose = "2.5.1"
coil = "2.2.1"
composePlugin = "1.5.3"
composePlugin = "1.5.11"
composeBom = "2023.10.01"
composeCompiler = "1.5.3"
composeCompiler = "1.5.7"
coroutines = "1.6.4"
dependencyAnalysis = "1.13.1"
dependencyAnalysis = "1.29.0"
detekt = "1.21.0"
junit5 = "5.8.2"
jvmTarget = "11"
kotlin = "1.9.10"
ksp = "1.9.10-1.0.13"
kotlin = "1.9.21"
ksp = "1.9.21-1.0.16"
mvicore = "1.2.6"
ribs = "0.39.0"
serialization-json = "1.5.0"
Expand Down Expand Up @@ -55,7 +55,7 @@ compose-material3 = { module = "androidx.compose.material3:material3" }
compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
compose-runtime = { module = "androidx.compose.runtime:runtime" }
compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }
compose-ui-test-junit4-android = { group = "androidx.compose.ui", name = "ui-test-junit4-android", version.ref = "composeCompiler" }
compose-ui-test-junit4-android = { module = "androidx.compose.ui:ui-test-junit4-android" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
compose-ui-ui = { module = "androidx.compose.ui:ui" }
compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 0 additions & 1 deletion utils/interop-ribs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ dependencies {
implementation(libs.androidx.activity.compose)

androidTestImplementation(composeBom)
androidTestImplementation(libs.androidx.activity.compose)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.compose.foundation.layout)
Expand Down

0 comments on commit dfd4362

Please sign in to comment.