Skip to content

Commit

Permalink
Add Maven publishing for release variant with sources jar
Browse files Browse the repository at this point in the history
  • Loading branch information
75py committed Jul 14, 2024
1 parent 12be336 commit 4d3a983
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'

id 'maven-publish'
}

android {
Expand Down Expand Up @@ -51,6 +53,12 @@ android {
buildFeatures {
buildConfig = true
}

publishing {
singleVariant('release') {
withSourcesJar()
}
}
}

dependencies {
Expand All @@ -70,3 +78,27 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.6.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}

publishing {
publications {
release(MavenPublication) {
groupId "com.nagopy.android"
artifactId "overlayviewmanager"
version publish_version_name

afterEvaluate {
from components.release
}

pom {
url = 'https://github.com/75py/Android-OverlayViewManager'

licenses {
license {
name = 'Apache License Version 2.0'
}
}
}
}
}
}

0 comments on commit 4d3a983

Please sign in to comment.