-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix gradle build & release on gradle 7.5.1
- Loading branch information
1 parent
2369d92
commit f6c4e0f
Showing
2 changed files
with
36 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
} | ||
|
@@ -19,8 +18,9 @@ task sourcesJar(type: Jar) { | |
from sourceSets.main.allSource | ||
} | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar | ||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
signing { | ||
|
@@ -31,50 +31,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 { | ||
javaServerSDK(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 { | ||
|
@@ -83,25 +85,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 | ||
} | ||
|
||
def wasmResourcePath = "$projectDir/src/main/resources" | ||
def wasmVersion = "1.1.28" | ||
def wasmUrl = "https://unpkg.com/@devcycle/bucketing-assembly-script@$wasmVersion/build/bucketing-lib.release.wasm" | ||
|
@@ -113,9 +96,8 @@ task downloadDVCBucketingWASM(type: Download) { | |
} | ||
} | ||
|
||
build { | ||
dependsOn downloadDVCBucketingWASM | ||
} | ||
processResources.dependsOn downloadDVCBucketingWASM | ||
sourcesJar.dependsOn downloadDVCBucketingWASM | ||
|
||
ext { | ||
retrofit_version = "2.9.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
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 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |