Skip to content

Commit

Permalink
Update publish module
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-megh-l committed Jan 4, 2024
1 parent 62425df commit 9dd7801
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions bottombar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ android {

defaultConfig {
minSdk = 24
targetSdk = 34

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
13 changes: 13 additions & 0 deletions scripts/publish-module.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'

tasks.register('androidSourcesJar', Jar) {
archiveClassifier.set('sources')
if (project.plugins.findPlugin("com.android.library")) {
from android.sourceSets.main.java.srcDirs
} else {
from sourceSets.main.java.srcDirs
}
}

artifacts {
archives androidSourcesJar
}
group = PUBLISH_GROUP_ID
version = rootProject.ext["publish_version"]

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
tasks.named("generateMetadataFileForReleasePublication").configure { dependsOn("androidSourcesJar") }

groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
Expand Down

0 comments on commit 9dd7801

Please sign in to comment.