Skip to content

Commit

Permalink
feat: add axiom release plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Nov 18, 2021
1 parent 25fd0ca commit 48a0a13
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 79 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ buildscript {
classpath "io.github.gradle-nexus:publish-plugin:$nexusPublishPluginVersion"
classpath "com.adarshr:gradle-test-logger-plugin:$testLoggerPluginVersion"
classpath "se.ascp.gradle:gradle-versions-filter:$versionsFilterPluginVersion"
classpath "pl.allegro.tech.build:axion-release-plugin:$axionReleasePluginVersion"
}
}

apply from: "${rootProject.projectDir}/gradle/versions.gradle"
apply from: "${rootProject.projectDir}/gradle/publish.gradle"
apply from: "${rootProject.projectDir}/gradle/release.gradle"

group = 'io.etcd'

Expand All @@ -43,8 +45,8 @@ allprojects {
subprojects {
apply from: "${rootProject.projectDir}/gradle/style.gradle"
apply from: "${rootProject.projectDir}/gradle/quality.gradle"
apply from: "${rootProject.projectDir}/gradle/release.gradle"
apply from: "${rootProject.projectDir}/gradle/release-tasks.gradle"
apply from: "${rootProject.projectDir}/gradle/publishing-release.gradle"
apply from: "${rootProject.projectDir}/gradle/publishing-release-tasks.gradle"

apply plugin: 'java-library'
apply plugin: "com.adarshr.test-logger"
Expand All @@ -68,3 +70,4 @@ subprojects {
}



2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# project
#
version = 999-SNAPSHOT
gitProject = 'https://github.com/etcd-io/jetcd'
gitURL = '[email protected]/etcd-io/jetcd.git'

Expand All @@ -22,6 +21,7 @@ shadowPluginVersion = 7.1.0
testLoggerPluginVersion = 3.1.0
protobufPluginVersion = 0.8.18
nexusPublishPluginVersion = 1.1.0
axionReleasePluginVersion = 1.13.6

#
# gradle
Expand Down
File renamed without changes.
97 changes: 97 additions & 0 deletions gradle/publishing-release.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
"${project.name}"(MavenPublication) {
groupId = rootProject.group

from components.java

pom {
name = project.name
description = project.name
url = "${gitProject}"

scm {
url = "${gitProject}"
connection = "scm:${gitProject}"
developerConnection = "scm:${gitURL}"
}

licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}

developers {
developer {
id = 'lburgazzoli'
name = 'Luca Burgazzoli'
organization = 'Red Hat'
organizationUrl = 'http://redhat.com'
}
developer {
name = 'Fanmin Shi'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
developer {
name = 'Xiang Li'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
developer {
name = 'Anthony Romano'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
}
}
}
}
}

signing {
required {
!version.endsWith('SNAPSHOT')
}

if (!version.endsWith('SNAPSHOT')) {
useGpgCmd()
}

sign publishing.publications."${project.name}"
}

javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}

83 changes: 7 additions & 76 deletions gradle/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,84 +14,15 @@
* limitations under the License.
*/

apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "pl.allegro.tech.build.axion-release"

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
"${project.name}"(MavenPublication) {
groupId = rootProject.group

from components.java

pom {
name = project.name
description = project.name
url = "${gitProject}"

scm {
url = "${gitProject}"
connection = "scm:${gitProject}"
developerConnection = "scm:${gitURL}"
}

licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}

developers {
developer {
id = 'lburgazzoli'
name = 'Luca Burgazzoli'
organization = 'Red Hat'
organizationUrl = 'http://redhat.com'
}
developer {
name = 'Fanmin Shi'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
developer {
name = 'Xiang Li'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
developer {
name = 'Anthony Romano'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
}
}
}
}
}

signing {
required {
!version.endsWith('SNAPSHOT')
}

if (!version.endsWith('SNAPSHOT')) {
useGpgCmd()
}

sign publishing.publications."${project.name}"
}

javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
scmVersion {
tag {
prefix = 'jetcd-'
}
}

allprojects {
project.version = scmVersion.version
}

0 comments on commit 48a0a13

Please sign in to comment.