Skip to content

Commit

Permalink
Merge branch 'main' into common-gradle-dependencies-release
Browse files Browse the repository at this point in the history
common-gradle-dependencies v0.5.0-20230310 release
  • Loading branch information
ShreckYe committed Mar 10, 2023
2 parents 7561d35 + 2ac8aa1 commit 53becba
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
5 changes: 1 addition & 4 deletions architecture-common-gradle-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ dependencies {
enabling it to always depend on a release version. */
implementation("com.huanshankeji:common-gradle-dependencies:$pluginProjectDependentStableCommonGradleDependenciesVersion")

// TODO: simplify
with(commonGradleClasspathDependencies.composeJb) {
implementation("$gradlePluginProjectGroupAndArtifact:$defaultVersion")
}
implementation(commonGradleClasspathDependencies.composeJb.gradlePlugin.pluginProject())
}

gradlePlugin {
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
`kotlin-dsl`
// Gradle 8.0.1's dependent Kotlin version is 1.8.10.
//kotlin("jvm") version "1.8.0"
// Gradle 8.0.2's dependent Kotlin version is 1.8.10.
//kotlin("jvm") version "1.8.10"
}

repositories {
Expand All @@ -24,13 +24,13 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-sam-with-receiver:1.8.0")
}
*/
//implementation(kotlin("gradle-plugin", "1.8.0")) // for Compose 1.3.0, but 1.8.10 has to be used for Gradle 8.0.1.
//implementation(kotlin("gradle-plugin", "1.8.10")) // for Compose 1.3.1
implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:4.0.6") // This version has to be used for Gradle 8.0.1.

implementation("com.gradle.publish:plugin-publish-plugin:1.1.0")

// This is a bootstrapping dependency (cross-version self-dependency). Try not to update its version unless necessary.
implementation("com.huanshankeji.team:gradle-plugins:0.3.0") { exclude("org.jetbrains.kotlin") }
// This is also a bootstrapping dependency.
implementation("com.huanshankeji:common-gradle-dependencies:0.3.2-20220728") { exclude("org.jetbrains.kotlin") }
implementation("com.huanshankeji:common-gradle-dependencies:0.4.0-20230223") { exclude("org.jetbrains.kotlin") }
}
8 changes: 5 additions & 3 deletions buildSrc/src/main/kotlin/VersionsAndDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import com.huanshankeji.CommonVersions
val commonVersions = CommonVersions()
val commonGradleClasspathDependencies = CommonGradleClasspathDependencies(commonVersions)

val kotlinVersion = "1.8.0" // for Compose 1.3.0
val kotlinVersion = "1.8.10" // for Compose 1.3.1

val alignedPluginVersion = "0.4.0-SNAPSHOT"

// "x.y.z" indicates the version of the way of organizing the code,
// and the date indicates the version when the dependency versions are updated.
val commonGradleDependenciesVersion = "0.4.0-20230223"
val commonGradleDependenciesVersion = "0.5.0-20230310"

val pluginProjectDependentStableCommonGradleDependenciesVersion = "0.3.2-20220728"
val pluginProjectDependentStableCommonGradleDependenciesVersion = "0.4.0-20230223".apply {
require(!endsWith("SNAPSHOT"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class CommonGradleClasspathDependencies(val versions: CommonVersions) {

val kotlin = Kotlin()

inner class ComposeJb internal constructor() {
val defaultVersion = versions.composeJb
inner class ComposeMultiplatform internal constructor() {
val defaultVersion = versions.composeMultiplatform

inner class GradlePlugin {
fun PluginDependenciesSpec.applyPluginWithoutVersion() =
Expand All @@ -33,5 +33,5 @@ class CommonGradleClasspathDependencies(val versions: CommonVersions) {
val gradlePlugin = GradlePlugin()
}

val composeJb = ComposeJb()
val composeMultiplatform = ComposeMultiplatform()
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CommonVersions(
val kotlinxDatetime: String = "0.4.0",
val exposed: String = "0.38.2",
val ktor: String = "2.0.3",
val composeJb: String = "1.3.0",
val composeMultiplatform: String = "1.3.1",

val vertx: String = "4.3.2",
val arrow: String = "1.1.2",
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.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

publishing.publications.withType<MavenPublication> {
artifact(javadocJar)
afterEvaluate {
// TODO: support JVM targets of other names?
//val jvmTargetNames = kotlin.targets.mapNotNull { if (it.platformType == KotlinPlatformType.jvm) it.name else null }

publishing.publications.withType<MavenPublication> {
//if (name in jvmTargetNames)
if (name == "jvm")
artifact(javadocJar)
}
}

0 comments on commit 53becba

Please sign in to comment.