Skip to content

Commit

Permalink
Update Freeletics Gradle Plugin to v0.7.0 (#550)
Browse files Browse the repository at this point in the history
* Update Freeletics Gradle Plugin to v0.7.0

* update build config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Ittner <[email protected]>
  • Loading branch information
renovate[bot] and gabrielittner authored Sep 28, 2023
1 parent e180595 commit 5642f67
Show file tree
Hide file tree
Showing 27 changed files with 43 additions and 65 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.kotlin.parcelize).apply(false)
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.android.library).apply(false)
alias(libs.plugins.jetbrains.compose).apply(false)
alias(libs.plugins.dokka).apply(false)
alias(libs.plugins.publish).apply(false)
alias(libs.plugins.gr8).apply(false)
Expand Down
1 change: 0 additions & 1 deletion codegen-compiler-test/codegen-compiler-test.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
}

freeletics {
explicitApi()
optIn(
"com.squareup.anvil.annotations.ExperimentalAnvilApi",
"org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi",
Expand Down
1 change: 0 additions & 1 deletion codegen-compiler/codegen-compiler.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ plugins {
}

freeletics {
explicitApi()
optIn(
"com.squareup.anvil.annotations.ExperimentalAnvilApi",
"com.google.devtools.ksp.KspExperimental",
Expand Down
1 change: 1 addition & 0 deletions codegen/api/jvm/codegen.api
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public abstract interface annotation class com/freeletics/khonshu/codegen/fragme
}

public final class com/freeletics/khonshu/codegen/internal/Fragment {
public static final field $stable I
public fun <init> ()V
}

Expand Down
9 changes: 2 additions & 7 deletions codegen/codegen.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import com.freeletics.gradle.plugin.FreeleticsAndroidExtension

plugins {
alias(libs.plugins.fgp.multiplatform)
alias(libs.plugins.fgp.publish)
}

freeletics {
explicitApi()
optIn(
"com.freeletics.khonshu.navigation.internal.InternalNavigationApi",
"com.freeletics.khonshu.codegen.internal.InternalCodegenApi",
Expand All @@ -17,17 +14,15 @@ freeletics {
addAndroidTarget(publish = true)
}

extensions.configure(FreeleticsAndroidExtension::class) {
enableCompose()
}
useCompose()
}

dependencies {
"commonMainApi"(projects.stateMachine)
"commonMainApi"(projects.navigation)
"commonMainApi"(libs.jetbrains.compose.runtime)
"commonMainApi"(libs.inject)

"androidMainApi"(libs.androidx.compose.runtime)
"androidMainApi"(libs.androidx.viewmodel)
"androidMainApi"(libs.androidx.viewmodel.savedstate)
"androidMainApi"(projects.stateMachine)
Expand Down
30 changes: 19 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@ coroutines = "1.7.3"
java-target= "11"
java-toolchain = "19"

fgp = "0.6.1"
fgp = "0.7.0"
gradle-api = "8.3"

android-gradle = "8.1.1"
android-min = "21"
android-target = "33"
android-compile = "33"
androidx-activity = "1.7.2"
androidx-annotations = "1.5.0"

androidx-compose-compiler = "1.5.3"
androidx-compose-runtime = "1.5.2"
androidx-compose-ui = "1.5.2"
androidx-compose-animation = "1.5.2"
jetbrains-compose = "1.5.1"
jetbrains-compose-compiler = "1.5.2"

androidx-activity = "1.7.2"
androidx-annotations = "1.5.0"
androidx-core = "1.12.0"
androidx-lifecycle = "2.6.2"
androidx-fragment = "1.6.1"
Expand Down Expand Up @@ -62,14 +66,17 @@ kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }

androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
androidx-annotations = { module = "androidx.annotation:annotation", version.ref = "androidx-annotations" }
androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "androidx-compose-compiler" }
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidx-compose-runtime" }
androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable", version.ref = "androidx-compose-runtime" }
androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose-ui" }
androidx-compose-animation = { module = "androidx.compose.animation:animation", version.ref = "androidx-compose-animation" }
jetbrains-compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "jetbrains-compose" }
jetbrains-compose-compiler = { module = "org.jetbrains.compose.compiler:compiler", version.ref = "jetbrains-compose-compiler" }

androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
androidx-annotations = { module = "androidx.annotation:annotation", version.ref = "androidx-annotations" }
androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx-core" }
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
Expand Down Expand Up @@ -113,11 +120,11 @@ kotlin-compile-testing-ksp = { module = "dev.zacsweers.kctfork:ksp", version.ref
gr8 = { module = "com.gradleup:gr8-plugin", version.ref = "gr8" }

[plugins]
fgp-android = { id = "com.freeletics.gradle.common.android", version.ref = "fgp" }
fgp-jvm = { id = "com.freeletics.gradle.common.jvm", version.ref = "fgp" }
fgp-multiplatform = { id = "com.freeletics.gradle.common.multiplatform", version.ref = "fgp" }
fgp-gradle = { id = "com.freeletics.gradle.common.gradle", version.ref = "fgp" }
fgp-publish = { id = "com.freeletics.gradle.common.publish.oss", version.ref = "fgp" }
fgp-android = { id = "com.freeletics.gradle.android", version.ref = "fgp" }
fgp-jvm = { id = "com.freeletics.gradle.jvm", version.ref = "fgp" }
fgp-multiplatform = { id = "com.freeletics.gradle.multiplatform", version.ref = "fgp" }
fgp-gradle = { id = "com.freeletics.gradle.gradle", version.ref = "fgp" }
fgp-publish = { id = "com.freeletics.gradle.publish.oss", version.ref = "fgp" }
fgp-root = { id = "com.freeletics.gradle.root", version.ref = "fgp" }
fgp-settings = { id = "com.freeletics.gradle.settings", version.ref = "fgp" }

Expand All @@ -126,6 +133,7 @@ kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
Expand Down
1 change: 0 additions & 1 deletion navigation-androidx/navigation-androidx.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
}

freeletics {
explicitApi()
optIn("com.freeletics.khonshu.navigation.internal.InternalNavigationApi")
}

Expand Down
5 changes: 1 addition & 4 deletions navigation-compose/navigation-compose.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ plugins {
}

freeletics {
explicitApi()
optIn("com.freeletics.khonshu.navigation.internal.InternalNavigationApi")

android {
enableCompose()
}
useCompose()
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions navigation-experimental/navigation-experimental.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ plugins {
}

freeletics {
explicitApi()
optIn("com.freeletics.khonshu.navigation.internal.InternalNavigationApi")

useCompose()

android {
enableCompose()
enableParcelize()
}
}
Expand Down
1 change: 0 additions & 1 deletion navigation-fragment/navigation-fragment.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
}

freeletics {
explicitApi()
optIn("com.freeletics.khonshu.navigation.internal.InternalNavigationApi")
}

Expand Down
1 change: 0 additions & 1 deletion navigation-testing/navigation-testing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
}

freeletics {
explicitApi()
optIn("com.freeletics.khonshu.navigation.internal.InternalNavigationApi")
}

Expand Down
1 change: 0 additions & 1 deletion navigation/navigation.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ plugins {
}

freeletics {
explicitApi()
optIn("com.freeletics.khonshu.navigation.internal.InternalNavigationApi")

multiplatform {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ plugins {

freeletics {
useDaggerWithKhonshu()

android {
enableCompose()
}
useCompose()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.freeletics.khonshu.codegen.compose.ComposeDestination
import com.freeletics.khonshu.codegen.compose.DestinationType
import com.freeletics.khonshu.codegen.compose.NavDestination
import com.freeletics.khonshu.sample.feature.bottomsheet.nav.BottomSheetRoute

@OptIn(ExperimentalMaterial3Api::class)
@ComposeDestination(
@NavDestination(
route = BottomSheetRoute::class,
stateMachine = BottomSheetStateMachine::class,
destinationType = DestinationType.OVERLAY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ plugins {

freeletics {
useDaggerWithKhonshu()

android {
enableCompose()
}
useCompose()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import com.freeletics.khonshu.codegen.compose.ComposeDestination
import com.freeletics.khonshu.codegen.compose.DestinationType
import com.freeletics.khonshu.codegen.compose.NavDestination
import com.freeletics.khonshu.sample.feature.dialog.nav.DialogRoute

@ComposeDestination(
@NavDestination(
route = DialogRoute::class,
stateMachine = DialogStateMachine::class,
destinationType = DestinationType.OVERLAY,
Expand Down
5 changes: 1 addition & 4 deletions sample/simple/feature/main/feature-main.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ plugins {

freeletics {
useDaggerWithKhonshu()

android {
enableCompose()
}
useCompose()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ plugins {

freeletics {
useDaggerWithKhonshu()

android {
enableCompose()
}
useCompose()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.freeletics.khonshu.codegen.compose.ComposeDestination
import com.freeletics.khonshu.codegen.compose.NavDestination
import com.freeletics.khonshu.sample.feature.root.nav.RootRoute

@ComposeDestination(
@NavDestination(
route = RootRoute::class,
stateMachine = RootStateMachine::class,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ plugins {

freeletics {
useDaggerWithKhonshu()

android {
enableCompose()
}
useCompose()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.freeletics.khonshu.codegen.compose.ComposeDestination
import com.freeletics.khonshu.codegen.compose.NavDestination
import com.freeletics.khonshu.sample.feature.screen.nav.ScreenRoute

@ComposeDestination(
@NavDestination(
route = ScreenRoute::class,
stateMachine = ScreenStateMachine::class,
)
Expand Down
2 changes: 1 addition & 1 deletion sample/simple/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ anvil = "2.4.8-1-8"
coroutines = "1.7.3"
dagger = "2.48"
dependency-analysis-gradle = "1.22.0"
fgp = "0.6.1"
fgp = "0.7.0"
khonshu = "0.17.0"
ksp = "1.9.10-1.0.13"
inject = "1"
Expand Down
2 changes: 1 addition & 1 deletion sample/simple/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pluginManagement {
}

plugins {
id("com.freeletics.gradle.settings").version("0.6.1")
id("com.freeletics.gradle.settings").version("0.7.0")
}

rootProject.name = "simple-sample"
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pluginManagement {
}

plugins {
id("com.freeletics.gradle.settings").version("0.6.1")
id("com.freeletics.gradle.settings").version("0.7.0")
}

rootProject.name = "khonshu"
1 change: 0 additions & 1 deletion state-machine-testing/state-machine-testing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
}

freeletics {
explicitApi()
}

dependencies {
Expand Down
1 change: 0 additions & 1 deletion state-machine/state-machine.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
}

freeletics {
explicitApi()

multiplatform {
addCommonTargets()
Expand Down
3 changes: 1 addition & 2 deletions text-resource/text-resource.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ plugins {
}

freeletics {
explicitApi()
useCompose()

android {
enableCompose()
enableParcelize()
}
}
Expand Down

0 comments on commit 5642f67

Please sign in to comment.