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
108android {
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.4"
3616 }
3717
3818 buildTypes {
@@ -50,93 +30,17 @@ android {
5030}
5131
5232dependencies {
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- }
89- }
90- }
91- }
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- }
110-
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- }
126- }
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- }
33+ implementation fileTree(dir : " libs" , include : [" *.jar" ])
34+ }
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