Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Knightwood committed Mar 10, 2023
1 parent 1b1e97b commit 1df2b60
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions camerax_lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'kotlin-parcelize'
id 'maven-publish'
}

android {
Expand Down Expand Up @@ -35,7 +36,25 @@ android {
jvmTarget = '1.8'
}
}
task generateSourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier 'sources'
}
publishing {
publications {
// 定义一个名为 Production 的发布
Production(MavenPublication) {
groupId = "com.github.knightwood"
artifactId = "SimpleCameraX"
version = "1.0"
// 必须有这个 否则不会上传AAR包
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
// 上传source,这样使用方可以看到方法注释
artifact generateSourcesJar
}
}

}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

Expand Down

0 comments on commit 1df2b60

Please sign in to comment.