Skip to content

Commit

Permalink
Merge pull request #126 from kitakkun/feature/refactor_gradle_scripts
Browse files Browse the repository at this point in the history
Refactor gradle scripts
  • Loading branch information
kitakkun authored Sep 22, 2024
2 parents e040a93 + b9f4248 commit ecfe8b0
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion backintime-annotations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.backintimeLint)
`maven-publish`
alias(libs.plugins.mavenPublish)
}

kotlin {
Expand Down
6 changes: 3 additions & 3 deletions backintime-demo/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ android {
}

dependencies {
implementation(project(":backintime-runtime"))
implementation(project(":backintime-annotations"))
implementation(project(":backintime-websocket-event"))
implementation(projects.backintimeRuntime)
implementation(projects.backintimeAnnotations)
implementation(projects.backintimeWebsocketEvent)
implementation(libs.core.ktx)
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.activity.compose)
Expand Down
2 changes: 1 addition & 1 deletion backintime-plugin/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.backintimeLint)
`maven-publish`
alias(libs.plugins.mavenPublish)
}

publishing {
Expand Down
6 changes: 3 additions & 3 deletions backintime-plugin/compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ plugins {
alias(libs.plugins.ksp)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.backintimeLint)
`maven-publish`
alias(libs.plugins.mavenPublish)
}

dependencies {
implementation(project(":backintime-plugin:common"))
implementation(project(":backintime-annotations"))
implementation(projects.backintimePlugin.common)
implementation(projects.backintimeAnnotations)
implementation(libs.kotlin.stdlib)
implementation(libs.kotlin.compiler.embeddable)
implementation(libs.kotlinx.serialization.json)
Expand Down
8 changes: 4 additions & 4 deletions backintime-plugin/gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.backintimeLint)
`java-gradle-plugin`
`maven-publish`
alias(libs.plugins.javaGradlePlugin)
alias(libs.plugins.mavenPublish)
}

gradlePlugin {
Expand All @@ -16,8 +16,8 @@ gradlePlugin {
}

dependencies {
implementation(project(":backintime-plugin:common"))
implementation(projects.backintimePlugin.common)
implementation(libs.kotlin.gradle.plugin.api)
implementation(libs.kotlinx.serialization.json)
compileOnly(kotlin("gradle-plugin"))
compileOnly(libs.kotlin.gradle.plugin)
}
6 changes: 3 additions & 3 deletions backintime-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.androidLibrary)
`maven-publish`
alias(libs.plugins.mavenPublish)
}

kotlin {
Expand All @@ -17,8 +17,8 @@ kotlin {

sourceSets {
commonMain.dependencies {
implementation(project(":backintime-websocket-client"))
implementation(project(":backintime-websocket-event"))
implementation(projects.backintimeWebsocketClient)
implementation(projects.backintimeWebsocketEvent)
implementation(libs.ktor.client.core)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.json)
Expand Down
4 changes: 2 additions & 2 deletions backintime-websocket-client/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
`maven-publish`
alias(libs.plugins.mavenPublish)
}

kotlin {
Expand All @@ -16,7 +16,7 @@ kotlin {

sourceSets {
commonMain.dependencies {
implementation(project(":backintime-websocket-event"))
implementation(projects.backintimeWebsocketEvent)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.cio)
implementation(libs.ktor.client.websockets)
Expand Down
2 changes: 1 addition & 1 deletion backintime-websocket-event/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.androidLibrary)
`maven-publish`
alias(libs.plugins.mavenPublish)
}

kotlin {
Expand Down
4 changes: 2 additions & 2 deletions backintime-websocket-server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
`maven-publish`
alias(libs.plugins.mavenPublish)
}

kotlin {
Expand All @@ -16,7 +16,7 @@ kotlin {

sourceSets {
commonMain.dependencies {
implementation(project(":backintime-websocket-event"))
implementation(projects.backintimeWebsocketEvent)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.ktor.server.cio)
implementation(libs.ktor.server.websockets)
Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ kotlinx-datetime = "0.6.0"
ktlint-gradle = { group = "org.jlleitschuh.gradle", name = "ktlint-gradle", version.ref = "ktlint-gradle" }

kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api", version.ref = "kotlin" }
kotlin-compiler-embeddable = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" }
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" }
Expand Down Expand Up @@ -103,3 +104,5 @@ androidLibrary = { id = "com.android.library", version.ref = "android-library" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
mavenPublish = { id = "maven-publish" }
javaGradlePlugin = { id = "java-gradle-plugin" }
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencyResolutionManagement {
}
}

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = "backintime"

include(
Expand Down
8 changes: 4 additions & 4 deletions test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation(project(":backintime-runtime"))
implementation(project(":backintime-annotations"))
implementation(project(":backintime-websocket-server"))
implementation(project(":backintime-websocket-event"))
implementation(projects.backintimeRuntime)
implementation(projects.backintimeAnnotations)
implementation(projects.backintimeWebsocketServer)
implementation(projects.backintimeWebsocketEvent)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.json)
}
Expand Down

0 comments on commit ecfe8b0

Please sign in to comment.