Skip to content

Commit 69d022f

Browse files
authored
Merge pull request #1 from simla-tech/update-SdkVersion
update SdkVersion version to 36
2 parents bfc5fe4 + a64c027 commit 69d022f

8 files changed

Lines changed: 89 additions & 172 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 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,7 @@ 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+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
45+
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
46+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
47+
run: ./gradlew :opuslib:publishReleasePublicationToMavenRepository --stacktrace

build.gradle

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
3-
buildscript {
4-
repositories {
5-
jcenter()
6-
}
7-
dependencies {
8-
classpath 'com.android.tools.build:gradle:1.5.0'
9-
//classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
10-
//classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
11-
}
2+
plugins {
3+
id "com.android.application" version "8.12.2" apply false
4+
id "com.android.library" version "8.12.2" apply false
5+
id "org.jetbrains.kotlin.android" version "2.2.10" apply false
126
}
137

148
allprojects {
159
repositories {
16-
jcenter()
10+
google()
11+
mavenCentral()
1712
}
1813
}

gradle/gradle-maven.gradle

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,59 @@
1-
apply plugin: 'maven'
2-
apply plugin: 'signing'
1+
apply plugin: "maven-publish"
2+
apply plugin: "signing"
33

4-
uploadArchives {
5-
repositories {
6-
mavenDeployer {
7-
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
8-
authentication(userName: System.getenv("OSSRH_USERNAME"), password: System.getenv("OSSRH_PASSWORD"))
9-
}
4+
publishing {
5+
publications {
6+
release(MavenPublication) {
107

11-
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
8+
afterEvaluate {
9+
from components.release
10+
}
1211

13-
pom.project {
14-
name 'OpusLib'
15-
description 'Re-publishing of OpusLib with no additional functionality.'
16-
url 'https://github.com/simla-tech/opus_android'
12+
pom {
13+
name.set("OpusLib")
14+
description.set("Re-publishing of OpusLib with no additional functionality.")
15+
url.set("https://github.com/simla-tech/opus_android")
1716

1817
licenses {
1918
license {
20-
name 'The Apache License, Version 2.0'
21-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
22-
distribution 'repo'
19+
name.set("The Apache License, Version 2.0")
20+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
21+
distribution.set("repo")
2322
}
2423
}
2524

2625
developers {
2726
developer {
28-
id 'SimlaTech'
29-
name 'Simla Mobile Dev Team'
30-
email System.getenv("SIMLA_TECH_EMAIL")
27+
id.set("SimlaTech")
28+
name.set("Simla Mobile Dev Team")
29+
email.set(System.getenv("SIMLA_TECH_EMAIL"))
3130
}
3231
}
3332

3433
scm {
35-
url 'https://github.com/simla-tech/opus_android'
36-
connection 'scm:git:git://github.com/simla-tech/opus_android.git'
37-
developerConnection 'scm:git:ssh://github.com/simla-tech/opus_android.git'
34+
url.set("https://github.com/simla-tech/opus_android")
35+
connection.set("scm:git:git://github.com/simla-tech/opus_android.git")
36+
developerConnection.set("scm:git:ssh://github.com/simla-tech/opus_android.git")
3837
}
3938
}
4039
}
4140
}
41+
42+
repositories {
43+
maven {
44+
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
45+
credentials {
46+
username = System.getenv("OSSRH_USERNAME")
47+
password = System.getenv("OSSRH_PASSWORD")
48+
}
49+
}
50+
}
4251
}
4352

44-
// Configure signing for all artifacts in 'archives' configuration
4553
signing {
46-
required { gradle.taskGraph.hasTask("uploadArchives") }
47-
sign configurations.archives
48-
}
54+
def signingKeyId = findProperty("signingKeyId") ?: System.getenv("SIGNING_KEY_ID")
55+
def signingKey = findProperty("signingKey") ?: System.getenv("SIGNING_KEY")
56+
def signingPassword = findProperty("signingKeyPassword") ?: System.getenv("SIGNING_KEY_PASSWORD")
57+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
58+
sign publishing.publications.release
59+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Apr 10 15:27:10 PDT 2013
1+
#Thu Sep 04 09:32:24 MSK 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip

oplayer/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
5-
compileSdkVersion 22
6-
buildToolsVersion "22.0.1"
4+
compileSdkVersion = 36
5+
buildToolsVersion "28.0.3"
76
defaultConfig {
87
applicationId "top.oply.oplayer"
98
minSdkVersion 15
10-
targetSdkVersion 22
9+
targetSdkVersion 36
1110
versionCode 2
1211
versionName '1.1'
1312
}

opuslib/build.gradle

Lines changed: 16 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,18 @@
1-
//import org.apache.tools.ant.taskdefs.condition.Os
2-
import org.gradle.plugins.signing.Sign
3-
apply plugin: 'com.android.library'
4-
//apply plugin: 'com.github.dcendents.android-maven'
5-
//apply plugin: 'com.jfrog.bintray'
1+
plugins {
2+
id 'com.android.library'
3+
id 'kotlin-android'
4+
}
65

7-
group = 'com.simla.android.opuslib'
8-
version = "1.0.3"
6+
apply from: "$rootDir/gradle/gradle-maven.gradle"
97

108
android {
11-
compileSdkVersion 22
12-
buildToolsVersion "22.0.1"
13-
resourcePrefix "ly__"
9+
namespace = "top.oply.opuslib"
10+
compileSdk = 36
1411

1512
defaultConfig {
16-
minSdkVersion 4
17-
targetSdkVersion 22
18-
versionCode 1
19-
versionName "1.0"
20-
}
21-
sourceSets.main {
22-
jni.srcDirs = [] // This prevents the auto generation of Android.mk
23-
jniLibs.srcDir 'src/main/libs' // This is not necessary unless you have precompiled libraries in your project.
24-
}
25-
26-
task ndkBuild(type: Exec) {
27-
//if (Os.isFamily(Os.FAMILY_WINDOWS)) {
28-
commandLine 'ndk-build.cmd', '-C', file('src/main/jni').absolutePath
29-
//} else {
30-
// commandLine 'ndk-build', '-C', file('src/main/jni').absolutePath
31-
//}
32-
}
33-
34-
tasks.withType(JavaCompile) {
35-
compileTask -> compileTask.dependsOn ndkBuild
13+
minSdk = 15
14+
targetSdkVersion 36
15+
version = "1.0.3"
3616
}
3717

3818
buildTypes {
@@ -47,96 +27,15 @@ android {
4727
zipAlignEnabled false
4828
}
4929
}
50-
}
5130

52-
dependencies {
53-
compile fileTree(include: ['*.jar'], dir: 'libs')
54-
}
55-
56-
/*
57-
def siteUrl = 'https://github.com/louisyonge/opus_android' // Project url
58-
def gitUrl = 'https://github.com/louisyonge/opus_android.git' // Git url
59-
group = "top.oply.opuslib" // Maven Group ID for the artifact,usually it's package name.
60-
install {
61-
repositories.mavenInstaller {
62-
// This generates POM.xml with proper parameters
63-
pom {
64-
project {
65-
packaging 'aar'
66-
// Add your description here
67-
name 'Opus library for Android' //Project description
68-
url siteUrl
69-
// Set your license
70-
licenses {
71-
license {
72-
name 'The Apache Software License, Version 2.0'
73-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
74-
}
75-
}
76-
developers {
77-
developer {
78-
id 'louis' //Some basic information
79-
name 'Louis'
80-
email 'ly.louisyoung@gmail.com'
81-
}
82-
}
83-
scm {
84-
connection gitUrl
85-
developerConnection gitUrl
86-
url siteUrl
87-
}
88-
}
31+
publishing {
32+
singleVariant('release') {
33+
withSourcesJar()
34+
withJavadocJar()
8935
}
9036
}
9137
}
92-
// */
93-
94-
task sourcesJar(type: Jar) {
95-
from android.sourceSets.main.java.srcDirs
96-
classifier = 'sources'
97-
}
98-
task javadoc(type: Javadoc) {
99-
source = android.sourceSets.main.java.srcDirs
100-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
101-
}
102-
task javadocJar(type: Jar, dependsOn: javadoc) {
103-
classifier = 'javadoc'
104-
from javadoc.destinationDir
105-
}
106-
artifacts {
107-
archives javadocJar
108-
archives sourcesJar
109-
}
11038

111-
/*
112-
Properties properties = new Properties()
113-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
114-
bintray {
115-
user = properties.getProperty("bintray.user")
116-
key = properties.getProperty("bintray.apikey")
117-
configurations = ['archives']
118-
pkg {
119-
repo = "maven"
120-
name = "opus_andorid" //Name appeared on JCenter
121-
websiteUrl = siteUrl
122-
vcsUrl = gitUrl
123-
licenses = ["Apache-2.0"]
124-
publish = true
125-
}
39+
dependencies {
40+
implementation fileTree(dir: "libs", include: ["*.jar"])
12641
}
127-
// */
128-
129-
apply from: rootProject.file('gradle/gradle-maven.gradle')
130-
131-
gradle.taskGraph.whenReady { taskGraph ->
132-
if (taskGraph.allTasks.any { it instanceof Sign }) {
133-
134-
def id = "INSERT KEY ID HERE"
135-
def file = project.file('INSERT RELATIVE PATH TO GPG FILE HERE').absolutePath
136-
def password = "INSERT KEY PASSWORD HERE"
137-
138-
allprojects { ext."signing.keyId" = id }
139-
allprojects { ext."signing.secretKeyRingFile" = file }
140-
allprojects { ext."signing.password" = password }
141-
}
142-
}

sample1/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 22
5-
buildToolsVersion "22.0.1"
4+
compileSdkVersion = 36
5+
buildToolsVersion "28.0.3"
66

77
defaultConfig {
88
applicationId "top.oply.opusplayer"
99
minSdkVersion 15
10-
targetSdkVersion 22
10+
targetSdkVersion 36
1111
versionCode 1
1212
versionName "1.0"
1313
}

settings.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
google()
5+
}
6+
}
7+
18
include ':opuslib'

0 commit comments

Comments
 (0)