Skip to content

Commit f8f11fb

Browse files
committed
修复jitpack无aar文件的问题
1 parent d19f89e commit f8f11fb

File tree

4 files changed

+37
-21
lines changed

4 files changed

+37
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ https://www.bilibili.com/video/BV1ikCCBREuJ/?vd_source=ec0fc1b63e4c5db56b1eca157
1919
[![](https://jitpack.io/v/zhaolewei/ZlwAudioRecorder.svg)](https://jitpack.io/#zhaolewei/ZlwAudioRecorder)
2020

2121
dependencies {
22-
implementation 'com.github.zhaolewei:ZlwAudioRecorder:v1.09'
22+
implementation 'com.github.zhaolewei:ZlwAudioRecorder:v1.11'
2323
}
2424

2525
allprojects {

app/build.gradle

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,9 @@ plugins {
33
id 'org.jetbrains.kotlin.android'
44
}
55

6-
publishing {
7-
publications {
8-
// 这个mavenJava可以随便填,只是一个任务名字而已
9-
// MavenPublication必须有,这个是调用的任务类
10-
mavenJava(MavenPublication) {
11-
// 这里头是artifacts的配置信息,不填会采用默认的
12-
groupId = 'org.gradle.sample'
13-
artifactId = 'library'
14-
version = '1.1'
15-
}
16-
}
17-
}
18-
196
android {
207
namespace 'com.zlw.audio_recorder'
21-
compileSdk 33
8+
compileSdk 36
229

2310
defaultConfig {
2411
applicationId "com.zlw.audio_recorder"
@@ -39,11 +26,11 @@ android {
3926
}
4027
}
4128
compileOptions {
42-
sourceCompatibility JavaVersion.VERSION_1_8
43-
targetCompatibility JavaVersion.VERSION_1_8
29+
sourceCompatibility JavaVersion.VERSION_11
30+
targetCompatibility JavaVersion.VERSION_11
4431
}
4532
kotlinOptions {
46-
jvmTarget = '1.8'
33+
jvmTarget = '11'
4734
}
4835
buildFeatures {
4936
compose true

jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk11

recorderlib/build.gradle

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
apply plugin: 'com.android.library'
2-
//apply plugin: 'com.github.dcendents.android-maven'
1+
plugins {
2+
id 'com.android.library'
3+
id 'maven-publish'
4+
}
5+
36
group='com.github.zhaolewei'
47

58
android {
69
namespace = "com.zlw.main.recorderlib"
7-
compileSdkVersion 33
10+
compileSdkVersion 36
811
defaultConfig {
912
minSdkVersion 16
1013
versionCode 1
@@ -23,8 +26,32 @@ android {
2326
jni.srcDirs = []//disable automatic ndk-build call
2427
jniLibs.srcDirs = ['libs']
2528
}
29+
compileOptions {
30+
sourceCompatibility JavaVersion.VERSION_11
31+
targetCompatibility JavaVersion.VERSION_11
32+
}
33+
publishing {
34+
singleVariant("release") {
35+
withSourcesJar()
36+
withJavadocJar()
37+
}
38+
}
2639
}
2740

2841
dependencies {
2942
implementation fileTree(dir: 'libs', include: ['*.jar'])
3043
}
44+
45+
publishing {
46+
publications {
47+
release(MavenPublication) {
48+
groupId = 'io.jitpack'
49+
artifactId = 'library'
50+
version = '1.0'
51+
52+
afterEvaluate {
53+
from components.release
54+
}
55+
}
56+
}
57+
}

0 commit comments

Comments
 (0)