Skip to content
Merged
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
18 changes: 11 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,19 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Setup Gradle 8.14
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '8.14'

- name: Gradle Wrapper
run: gradle wrapper
run: gradle wrapper --gradle-version=8.14

- name: Publish with Gradle
env:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
OSSRH_USERNAME: ${{ secrets.MAVEN_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
run: ./gradlew lexfloatclient:publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository -PlexVersion=${{github.event.inputs.packageVersion}} --info --warning-mode all
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY_ARMORED }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
run: ./gradlew lexfloatclient:publishAndReleaseToMavenCentral -PlexVersion=${{github.event.inputs.packageVersion}} --info --warning-mode all
2 changes: 1 addition & 1 deletion .github/workflows/test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
run: gradle wrapper

- name: Publish with Gradle
run: ./gradlew lexfloatclient:publishTestPublicationToMavenLocal --info --warning-mode all
run: ./gradlew lexfloatclient:publishToMavenLocal --info --warning-mode all --dry-run
18 changes: 0 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,13 @@ buildscript {
}
}

plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}

if (project.hasProperty("lexVersion")) {
project.setVersion(lexVersion)
}
ext {
PUBLISH_GROUP_ID = 'com.cryptlex.android.lexfloatclient'
PUBLISH_ARTIFACT_ID = 'lexfloatclient'
PUBLISH_VERSION = version
OSSRH_USERNAME = System.getenv('OSSRH_USERNAME')
OSSRH_PASSWORD = System.getenv('OSSRH_PASSWORD')
}

nexusPublishing {
repositories {
sonatype {
stagingProfileId = "24cd3440581936"
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = OSSRH_USERNAME
password = OSSRH_PASSWORD
}
}
}

group = "com.cryptlex.android.lexfloatclient"
Expand Down
105 changes: 40 additions & 65 deletions lexfloatclient/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'com.android.library'
id 'maven-publish'
id 'signing'
id 'com.vanniktech.maven.publish' version '0.34.0'
}

android {
Expand All @@ -23,74 +22,50 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}

namespace 'com.cryptlex.android.lexfloatclient'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'net.java.dev.jna:jna:5.13.0@aar'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
}

publishing {
publications {
release(MavenPublication) {
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
afterEvaluate {
from components.release
pom {
name = 'LexFloatClient'
description = 'LexFloatClient wrapper for Android (licensing library).'
url = 'https://github.com/cryptlex/lexfloatclient-android'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
organization {
name = 'Cryptlex, LLC'
url = 'https://cryptlex.com'
}
developers {
developer {
name = 'Cryptlex Team'
email = 'support@cryptlex.com'
organization = 'Cryptlex, LLC.'
organizationUrl = 'https://cryptlex.com'
}
}
scm {
connection = 'scm:git:https://github.com/cryptlex/lexfloatclient-android.git'
developerConnection = 'scm:git:ssh://github.com/cryptlex/lexfloatclient-android.git'
url = 'https://github.com/cryptlex/lexfloatclient-android'
}
}
}
}

test(MavenPublication) {
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
afterEvaluate {
from components.release
}
}
}
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.release
}
mavenPublishing {
publishToMavenCentral(true)
signAllPublications()

coordinates(PUBLISH_GROUP_ID, PUBLISH_ARTIFACT_ID, PUBLISH_VERSION)

pom {
name = 'LexFloatClient'
description = 'LexFloatClient wrapper for Android (licensing library).'
url = 'https://github.com/cryptlex/lexfloatclient-android'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
organization {
name = 'Cryptlex, LLP'
url = 'https://cryptlex.com'
}
developers {
developer {
name = 'Cryptlex Team'
email = 'support@cryptlex.com'
organization = 'Cryptlex, LLP.'
organizationUrl = 'https://cryptlex.com'
}
}
scm {
connection = 'scm:git:https://github.com/cryptlex/lexfloatclient-android.git'
developerConnection = 'scm:git:ssh://github.com/cryptlex/lexfloatclient-android.git'
url = 'https://github.com/cryptlex/lexfloatclient-android'
}
}
}
86 changes: 0 additions & 86 deletions lexfloatclient/maven-central.gradle

This file was deleted.