Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update build.gradle to remove usages of deprecated maven plugin & upgrade to gradle 7.5.1 #39

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 30 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
id 'de.undercouch.download' version '5.2.0'
id 'java'
id 'java-library'
id 'maven'
id 'maven-publish'
id 'signing'
}
Expand All @@ -31,50 +30,52 @@ group = "com.devcycle"
archivesBaseName = "java-server-sdk"
version = "1.1.3"

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'DevCycle Java Server SDK'
packaging 'jar'
// optionally artifactId can be defined here
description 'Server side SDK to interact with DevCycle.'
url 'https://devcycle.com'
publishing {
publications {
myLibrary(MavenPublication) {
from components.java
pom {
name = 'DevCycle Java Server SDK'
packaging = 'jar'
artifactId = 'java-server-sdk'
description = 'Server side SDK to interact with DevCycle.'
url = 'https://devcycle.com'

scm {
connection 'scm:git:git://github.com/DevCycleHQ/java-server-sdk.git'
developerConnection 'scm:git:ssh://github.com:DevCycleHQ/java-server-sdk.git'
url 'https://github.com/DevCycleHQ/java-server-sdk'
connection = 'scm:git:git://github.com/DevCycleHQ/java-server-sdk.git'
developerConnection = 'scm:git:ssh://github.com:DevCycleHQ/java-server-sdk.git'
url = 'https://github.com/DevCycleHQ/java-server-sdk'
}

licenses {
license {
name 'MIT License'
url 'https://www.opensource.org/licenses/mit-license.php'
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}

developers {
developer {
id 'devcycle'
name 'DevCycle Engineering'
email '[email protected]'
organization 'DevCycle'
id = 'devcycle'
name = 'DevCycle Engineering'
email = '[email protected]'
organization = 'DevCycle'
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}

repositories {
Expand All @@ -83,20 +84,6 @@ repositories {

sourceCompatibility = JavaVersion.VERSION_1_8

install {
repositories.mavenInstaller {
pom.artifactId = 'java-server-sdk'
}
}

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

task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists