Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
phearnot committed Oct 12, 2023
1 parent 80b0a5d commit 36125b0
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 98 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [master]
tags:
- v[0-9].[0-9]+.[0-9]+
pull_request:

jobs:
build-native:
Expand Down Expand Up @@ -78,17 +79,15 @@ jobs:
- name: Publish Snapshot
if: ${{ !contains(github.ref, '/tags/') }}
run: |
./gradlew uploadArchives \
-PsonatypeRepo=https://oss.sonatype.org/content/repositories/snapshots \
./gradlew publishToSonatype \
-PsonatypeUsername='${{ secrets.OSSRH_USERNAME }}' \
-PsonatypePassword='${{ secrets.OSSRH_PASSWORD }}' \
-PgpgKey='${{ secrets.OSSRH_GPG_KEY_ASCII }}' \
-PgpgPassphrase='${{ secrets.OSSRH_GPG_PASSPHRASE }}'
- name: Publish Release
if: contains(github.ref, '/tags/')
run: |
./gradlew uploadArchives closeAndReleaseRepository \
-PsonatypeRepo=https://oss.sonatype.org/service/local/staging/deploy/maven2 \
./gradlew publishToSonatype closeAndReleaseRepository \
-PsonatypeUsername='${{ secrets.OSSRH_USERNAME }}' \
-PsonatypePassword='${{ secrets.OSSRH_PASSWORD }}' \
-PgpgKey='${{ secrets.OSSRH_GPG_KEY_ASCII }}' \
Expand Down
27 changes: 8 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.2"
}
plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}

subprojects {
ext.version_number = "0.6.6"
ext.group_info = "com.wavesplatform"
}
group = "com.wavesplatform"
version = "0.6.6-SNAPSHOT"

apply plugin: 'io.codearte.nexus-staging'

nexusStaging {
packageGroup = "com.wavesplatform"
username = sonatypeUsername
password = sonatypePassword
numberOfRetries = 100
delayBetweenRetriesInMillis = 5000
nexusPublishing {
repositories {
sonatype()
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
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-5.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down
106 changes: 38 additions & 68 deletions java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
apply plugin: 'java'

apply plugin: 'maven'
apply plugin: 'signing'
plugins {
id "java-library"
id "maven-publish"
id "signing"
id "me.champeau.jmh" version "0.7.1"
}

sourceCompatibility = 1.7
archivesBaseName = "curve25519-java"
version = version_number
group = group_info
sourceCompatibility = 1.8
group = "com.wavesplatform"
name = "curve25519-java"
version = "0.6.6-SNAPSHOT"

repositories {
mavenCentral()
Expand All @@ -20,96 +22,64 @@ sourceSets {
}
}

buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "me.champeau.gradle:jmh-gradle-plugin:0.5.0-rc-2"
}
}

apply plugin: "me.champeau.gradle.jmh"

jmh {
dependencies {
compileClasspath 'org.openjdk.jmh:jmh-core:1.4.1'
}
humanOutputFile = null
duplicateClassesStrategy = 'exclude'
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
}

dependencies {
compile group: 'net.java.dev.jna', name: 'jna', version: '5.13.0'
testCompile project(':tests')
implementation 'net.java.dev.jna:jna:5.13.0'
testImplementation project(':tests')
jmh 'org.openjdk.jmh:jmh-core:1.4.1'
}

signing {
useInMemoryPgpKeys(gpgKey, gpgPassphrase)
sign configurations.archives
}

uploadArchives {
configuration = configurations.archives
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)

repository(url: sonatypeRepo) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

pom.project {
name 'curve25519-java'
packaging 'jar'
description 'Curve25519 library for Java'
url 'https://github.com/WhisperSystems/curve25519-java'
pom {
name = 'curve25519-java'
description = 'Curve25519 library for Java'
url = 'https://github.com/WhisperSystems/curve25519-java'

scm {
url 'scm:git@github.com:WhisperSystems/curve25519-java.git'
connection 'scm:git@github.com:WhisperSystems/curve25519-java.git'
developerConnection 'scm:git@github.com:WhisperSystems/curve25519-java.git'
}
scm {
url = 'scm:git@github.com:WhisperSystems/curve25519-java.git'
connection = 'scm:git@github.com:WhisperSystems/curve25519-java.git'
developerConnection = 'scm:git@github.com:WhisperSystems/curve25519-java.git'
}

licenses {
license {
name 'GPLv3'
url 'https://www.gnu.org/licenses/gpl-3.0.txt'
distribution 'repo'
licenses {
license {
name = 'GPLv3'
url = 'https://www.gnu.org/licenses/gpl-3.0.txt'
distribution = 'repo'
}
}
}

developers {
developer {
name 'Trevor Perrin'
name 'Moxie Marlinspike'
developers {
developer {
name = 'Trevor Perrin'
name = 'Moxie Marlinspike'
}
}
}
}
}
}

task installArchives(type: Upload) {
description "Installs the artifacts to the local Maven repository."
configuration = configurations['archives']
repositories {
mavenDeployer {
repository url: "file://${System.properties['user.home']}/.m2/repository"
}
}
}


task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
classifier = 'javadoc'
}

task packageSources(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

artifacts {
Expand Down
8 changes: 4 additions & 4 deletions tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'java'

sourceCompatibility = 1.7
sourceCompatibility = 1.8

repositories {
mavenCentral()
}

dependencies {
compile project(':java')
compile 'junit:junit:3.8.2'
compile 'org.easytesting:fest-assert:1.4'
implementation project(':java')
implementation 'junit:junit:3.8.2'
implementation 'org.easytesting:fest-assert:1.4'
}

test {
Expand Down

0 comments on commit 36125b0

Please sign in to comment.