Skip to content

Commit

Permalink
use plugin to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
atimin committed Aug 21, 2024
1 parent 7ce8658 commit d692903
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
36 changes: 21 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'maven-publish'
id "io.freefair.lombok" version "6.5.0-rc1"
id "io.freefair.lombok" version "8.10"
id "com.vanniktech.maven.publish" version "0.29.0"
}

version = '0.1.0'
Expand Down Expand Up @@ -41,22 +41,28 @@ tasks.named('test') {
useJUnitPlatform()
}

import com.vanniktech.maven.publish.SonatypeHost

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}

repositories {
maven {
name = "MavenCentral"
url = uri("https://s01.oss.sonatype.org/service/local/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)

coordinates(archivesBaseName, archivesBaseName, version)
pom {
name = archivesBaseName
description = "ReductStore Client SDK for Java"
url = "https://www.reduct.store/docs"

licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
}
}
scm {
url = "https://github.com/reductstore/reduct-java.git"
connection = "scm:git:git://github.com/reductstore/reduct-java.git"
developerConnection = "scm:git:ssh://github.com/reductstore/reduct-java.git"
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 4 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down

0 comments on commit d692903

Please sign in to comment.