Skip to content

Commit

Permalink
add maven publish plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimsn98 committed Nov 7, 2021
1 parent 2f676b7 commit 64f5b83
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
jdk:
- openjdk11
- openjdk11
install:
- ./gradlew build :lib:publishToMavenLocal
17 changes: 17 additions & 0 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'maven-publish'

android {
compileSdkVersion 31
Expand Down Expand Up @@ -36,6 +37,22 @@ android {
}
}

task androidSourcesJar(type: Jar) {
classifier 'sources'
from android.sourceSets.main.java.srcDirs
}

project.afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
artifact androidSourcesJar
}
}
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31"
implementation 'androidx.core:core-ktx:1.7.0'
Expand Down

0 comments on commit 64f5b83

Please sign in to comment.