Skip to content

Commit cae0843

Browse files
committed
Updated publis
1 parent 16d1bd4 commit cae0843

3 files changed

Lines changed: 50 additions & 70 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,27 @@ jobs:
1111

1212
steps:
1313
- name: Checkout project sources
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515

16-
- name: Setup java
17-
uses: actions/setup-java@v3
16+
- name: Setup Java
17+
uses: actions/setup-java@v4
1818
with:
19-
distribution: corretto
20-
java-version: 8
19+
distribution: temurin
20+
java-version: 17
21+
cache: gradle
2122

2223
- name: Setup Android SDK
2324
uses: android-actions/setup-android@v3
2425
with:
25-
cmdline-tools-version: 8512546
26-
packages: 'build-tools;22.0.1 platforms;android-22'
26+
packages: |
27+
platform-tools
28+
platforms;android-36
29+
build-tools;36.0.0
2730
2831
- name: Setup Android NDK
2932
uses: nttld/setup-ndk@v1
3033
with:
31-
ndk-version: r10e
34+
ndk-version: r28
3235

3336
- name: Setup Gradle
3437
uses: gradle/gradle-build-action@v2
@@ -38,4 +41,4 @@ jobs:
3841
SIMLA_MOBILE_APPS_EMAIL: ${{ secrets.SIMLA_MOBILE_APPS_EMAIL }}
3942
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
4043
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
41-
run: ./gradlew :opuslib:uploadArchives --stacktrace
44+
run: ./gradlew :opuslib:publishReleasePublicationToMavenRepository --stacktrace

gradle/gradle-maven.gradle

Lines changed: 37 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,52 @@
11
apply plugin: "maven-publish"
22
apply plugin: "signing"
33

4-
afterEvaluate {
5-
def releaseComponent = components.findByName("release") ?: components.findByName("debug")
6-
if (releaseComponent == null) {
7-
throw new GradleException("No component found to publish! Make sure this is an Android Library module with a release build type.")
8-
}
9-
10-
publishing {
11-
publications {
12-
release(MavenPublication) {
13-
from releaseComponent
14-
15-
groupId = "top.oply"
16-
artifactId = "opuslib"
17-
version = "1.0.0"
18-
19-
pom {
20-
name.set("OpusLib")
21-
description.set("Re-publishing of OpusLib with no additional functionality.")
22-
url.set("https://github.com/simla-tech/opus_android")
23-
24-
licenses {
25-
license {
26-
name.set("The Apache License, Version 2.0")
27-
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
28-
distribution.set("repo")
29-
}
30-
}
31-
32-
developers {
33-
developer {
34-
id.set("SimlaTech")
35-
name.set("Simla Mobile Dev Team")
36-
email.set(System.getenv("SIMLA_TECH_EMAIL"))
37-
}
4+
publishing {
5+
publications {
6+
release(MavenPublication) {
7+
from releaseComponent
8+
9+
pom {
10+
name.set("OpusLib")
11+
description.set("Re-publishing of OpusLib with no additional functionality.")
12+
url.set("https://github.com/simla-tech/opus_android")
13+
14+
licenses {
15+
license {
16+
name.set("The Apache License, Version 2.0")
17+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
18+
distribution.set("repo")
3819
}
20+
}
3921

40-
scm {
41-
url.set("https://github.com/simla-tech/opus_android")
42-
connection.set("scm:git:git://github.com/simla-tech/opus_android.git")
43-
developerConnection.set("scm:git:ssh://github.com/simla-tech/opus_android.git")
22+
developers {
23+
developer {
24+
id.set("SimlaTech")
25+
name.set("Simla Mobile Dev Team")
26+
email.set(System.getenv("SIMLA_TECH_EMAIL"))
4427
}
4528
}
46-
}
47-
}
4829

49-
repositories {
50-
maven {
51-
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
52-
credentials {
53-
username = System.getenv("OSSRH_USERNAME")
54-
password = System.getenv("OSSRH_PASSWORD")
30+
scm {
31+
url.set("https://github.com/simla-tech/opus_android")
32+
connection.set("scm:git:git://github.com/simla-tech/opus_android.git")
33+
developerConnection.set("scm:git:ssh://github.com/simla-tech/opus_android.git")
5534
}
5635
}
5736
}
5837
}
5938

60-
signing {
61-
sign publishing.publications.release
39+
repositories {
40+
maven {
41+
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
42+
credentials {
43+
username = System.getenv("OSSRH_USERNAME")
44+
password = System.getenv("OSSRH_PASSWORD")
45+
}
46+
}
6247
}
6348
}
49+
50+
signing {
51+
sign publishing.publications.release
52+
}

opuslib/build.gradle

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212
defaultConfig {
1313
minSdk = 15
1414
targetSdkVersion 36
15-
version = "1.0.4"
15+
version = "1.0.3"
1616
}
1717

1818
buildTypes {
@@ -32,15 +32,3 @@ android {
3232
dependencies {
3333
implementation fileTree(dir: "libs", include: ["*.jar"])
3434
}
35-
36-
//gradle.taskGraph.whenReady { taskGraph ->
37-
// if (taskGraph.allTasks.any { it.name.startsWith("sign") }) {
38-
// def keyId = "INSERT KEY ID HERE"
39-
// def secretKeyFile = file("INSERT RELATIVE PATH TO GPG FILE HERE").absolutePath
40-
// def keyPassword = "INSERT KEY PASSWORD HERE"
41-
//
42-
// ext["signing.keyId"] = keyId
43-
// ext["signing.secretKeyRingFile"] = secretKeyFile
44-
// ext["signing.password"] = keyPassword
45-
// }
46-
//}

0 commit comments

Comments
 (0)