diff --git a/build.gradle.kts b/build.gradle.kts deleted file mode 100644 index e460bea..0000000 --- a/build.gradle.kts +++ /dev/null @@ -1,9 +0,0 @@ -plugins { - `kotlin-dsl` - id("com.vanniktech.maven.publish") version "0.30.0" apply false - //id("tech.yanand.maven-central-publish") version "1.3.0" apply false -} - -group = "net.risesoft.y9" -version = "0.0.2" - diff --git a/gradle.properties b/gradle.properties index 9a467c0..7b97e24 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,7 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 testsEnabled=false +Y9_VERSION=v9.7.0-SNAPSHOT Y9BOM_VERSION=9.7.0 PROJECT_GIT_URL=https://github.com/risesoft-y9/Digital-Infrastructure PROJECT_SCM_URL=scm:git:https://github.com/risesoft-y9/Digital-Infrastructure.git diff --git a/risenet-gradle-build-logic/build.gradle.kts b/risenet-gradle-build-logic/build.gradle.kts index aedd724..bfa0654 100644 --- a/risenet-gradle-build-logic/build.gradle.kts +++ b/risenet-gradle-build-logic/build.gradle.kts @@ -6,7 +6,7 @@ plugins { `kotlin-dsl` `maven-publish` signing - id("com.vanniktech.maven.publish") + id("com.vanniktech.maven.publish") version "0.30.0" } dependencies { @@ -15,11 +15,16 @@ dependencies { implementation("io.freefair.gradle:aspectj-plugin:8.11") implementation("io.freefair.gradle:lombok-plugin:8.11") implementation("tech.yanand.gradle:maven-central-publish:1.3.0") - implementation("com.vanniktech:gradle-maven-publish-plugin:0.13.0") + implementation("com.vanniktech:gradle-maven-publish-plugin:0.30.0") } -group = rootProject.group.toString() -version = rootProject.version.toString() +repositories { + mavenCentral() + gradlePluginPortal() +} + +group = "net.risesoft.y9" +version = "9.7.0" signing { //useGpgCmd() diff --git a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-conventions.gradle.kts b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-conventions.gradle.kts index adb1770..e3550dc 100644 --- a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-conventions.gradle.kts +++ b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-conventions.gradle.kts @@ -1,5 +1,3 @@ -import gradle.kotlin.dsl.accessors._b43a41b3a2c24e7f863347686afebb31.versionCatalogs - plugins { id("java-library") id("net.risesoft.y9.management") @@ -7,14 +5,7 @@ plugins { } group = "net.risesoft" - -val versionCatalog = versionCatalogs.named("libs") -val y9version = versionCatalog.findVersion("y9-version") -if(y9version.isPresent) { - version = y9version.get().displayName -} else { - version = "v9.7.0-SNAPSHOT" -} +version = findProperty("Y9_VERSION").toString() java { sourceCompatibility = JavaVersion.VERSION_21 diff --git a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-publish.gradle.kts b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-publish.gradle.kts index 4776793..dbab2fe 100644 --- a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-publish.gradle.kts +++ b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.java-publish.gradle.kts @@ -9,16 +9,8 @@ plugins { id("net.risesoft.y9.repository") } -val versionCatalog = versionCatalogs.named("libs") -val y9version = versionCatalog.findVersion("y9-version") -if(y9version.isPresent) { - version = y9version.get().displayName -} else { - version = "v9.7.0-SNAPSHOT" -} - -extra.set("PROJECT_GIT_URL", "https://github.com/risesoft-y9/Digital-Infrastructure") -extra.set("PROJECT_SCM_URL", "scm:git:https://github.com/risesoft-y9/Digital-Infrastructure.git") +group = "net.risesoft" +version = findProperty("Y9_VERSION").toString() publishing { publications { diff --git a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.javaPlatform-publish.gradle.kts b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.javaPlatform-publish.gradle.kts index 31ae44c..cfdb080 100644 --- a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.javaPlatform-publish.gradle.kts +++ b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.javaPlatform-publish.gradle.kts @@ -5,6 +5,9 @@ plugins { id("net.risesoft.y9.repository") } +group = "net.risesoft" +version = findProperty("Y9_VERSION").toString() + publishing { publications { repositories { diff --git a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.management.gradle.kts b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.management.gradle.kts index 2a074ea..05e57f9 100644 --- a/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.management.gradle.kts +++ b/risenet-gradle-build-logic/src/main/kotlin/net.risesoft.y9.management.gradle.kts @@ -54,5 +54,5 @@ java.sourceSets.forEach { t -> } //val dependency = project.dependencies.platform(project.dependencies.project(":y9-digitalbase-dependencies")) -val dependency = project.dependencies.platform("net.risesoft.y9:y9-digitalbase-dependencies:0.0.1") -management.dependencies.add(dependency) +//val dependency = project.dependencies.platform("net.risesoft.y9:y9-digitalbase-dependencies:0.0.1") +//management.dependencies.add(dependency) diff --git a/risenet-gradle-version-catalog/build.gradle.kts b/risenet-gradle-version-catalog/build.gradle.kts index 954a435..27a8420 100644 --- a/risenet-gradle-version-catalog/build.gradle.kts +++ b/risenet-gradle-version-catalog/build.gradle.kts @@ -4,11 +4,22 @@ import com.vanniktech.maven.publish.VersionCatalog plugins { signing `version-catalog` - id("com.vanniktech.maven.publish") + id("com.vanniktech.maven.publish") version "0.30.0" } -group = rootProject.group.toString() -version = rootProject.version.toString() +repositories { + mavenCentral() + gradlePluginPortal() +} + +catalog { + versionCatalog { + from(files("../gradle/libs.versions.toml")) + } +} + +group = "net.risesoft.y9" +version = "9.7.0" signing { //useGpgCmd() diff --git a/settings.gradle.kts b/settings.gradle.kts index 37ec7b4..d1c9a59 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,18 +1,4 @@ -pluginManagement { - repositories { - gradlePluginPortal() - mavenCentral() - } -} - -dependencyResolutionManagement { - repositories { - mavenCentral() - gradlePluginPortal() - } -} - rootProject.name = "y9-build-logic" -include("risenet-gradle-build-logic") -include("risenet-gradle-version-catalog") +includeBuild("risenet-gradle-build-logic") +includeBuild("risenet-gradle-version-catalog")