diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee8923b..c5f64b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: with: java-version: '11' distribution: 'temurin' - - name: Build with Gradle + - name: Build and Test with Gradle uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 with: - arguments: build + arguments: build publishToMavenLocal diff --git a/build.gradle.kts b/build.gradle.kts index c292f64..28e1c39 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,11 +9,16 @@ plugins { id("io.github.detekt.gradle.compiler-plugin") id("java-library") id("maven-publish") + id("pl.allegro.tech.build.axion-release") } subprojects { apply(plugin = "java-library") apply(plugin = "maven-publish") + apply(plugin = "pl.allegro.tech.build.axion-release") + + group = "com.github.certora.collections" + version = scmVersion.version repositories { mavenCentral() @@ -37,40 +42,11 @@ subprojects { } } - publishing { - publications { - repositories { - maven { - name = "GitHubPackages" - url = URI("https://maven.pkg.github.com/Certora/collections") - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } - - withType { - version = if (project.hasProperty("release")) { - "${project.version}" - } else { - "${project.version}-SNAPSHOT" - } - - pom { - licenses { - license { - name.set("MIT License") - url.set("https://github.com/Certora/collections/blob/4bc9da2c8197aea0ed3ad8b32b5a3dbcd69e725e/LICENSE") - } - } - scm { - connection.set("scm:git:https://github.com/Certora/collections.git") - developerConnection.set("scm:git:ssh://github.com/Certora/collections.git") - url.set("https://github.com/Certora/collections/") - } - } - } - } - } + publishing { + publications { + create("maven") { + from(components["java"]) + } + } + } } diff --git a/collect/build.gradle.kts b/collect/build.gradle.kts index 1e6f055..aaf3dd7 100644 --- a/collect/build.gradle.kts +++ b/collect/build.gradle.kts @@ -17,20 +17,6 @@ detekt { config.setFrom("detekt.yml") } -publishing { - publications { - create("certora-collections") { - from(components["java"]) - - pom { - name.set("Certrora Collections") - description.set("Efficient collection types for Kotlin") - url.set("http://www.github.com/Certora/collections") - } - } - } -} - dependencies { implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5") detektPlugins(project(":detekt-treapability")) diff --git a/detekt-treapability/build.gradle.kts b/detekt-treapability/build.gradle.kts index 30dd6d6..1c11862 100644 --- a/detekt-treapability/build.gradle.kts +++ b/detekt-treapability/build.gradle.kts @@ -14,14 +14,6 @@ tasks.withType { testLogging.showStandardStreams = true } -publishing { - publications { - create("certora-common-collections-detekt") { - from(components["java"]) - } - } -} - dependencies { val detektVersion: String by project val junitVersion: String by project diff --git a/gradle.properties b/gradle.properties index 41912a1..a284b8f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,5 @@ -group=com.certora -version=0.1.0 kotlinVersion=1.8.21 javaVersion=11 detektVersion=1.23.1 junitVersion=5.9.1 +axionVersion=1.15.5 diff --git a/settings.gradle.kts b/settings.gradle.kts index a9384da..b9f0672 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,10 +1,12 @@ pluginManagement { val kotlinVersion: String by settings val detektVersion: String by settings + val axionVersion: String by settings plugins { id("org.jetbrains.kotlin.jvm") version kotlinVersion kotlin("plugin.serialization") version kotlinVersion id("io.github.detekt.gradle.compiler-plugin") version detektVersion + id("pl.allegro.tech.build.axion-release") version axionVersion } repositories { mavenCentral()