Skip to content

Commit

Permalink
feat: add maven publish
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyMuse committed Jul 15, 2022
1 parent 40a77ec commit 20e936d
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

Expand Down Expand Up @@ -72,6 +71,8 @@ subprojects {
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'maven-publish'


dependencies {
testImplementation 'junit:junit:4.13.2'
Expand Down Expand Up @@ -99,6 +100,17 @@ subprojects {
api "androidx.lifecycle:lifecycle-common-java8:$lifecycle"
api "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle"
}

it.afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
}
}
}
}

break

case 'extensions':
Expand All @@ -108,6 +120,7 @@ subprojects {
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'maven-publish'

dependencies {
implementation project(path: ':core')
Expand All @@ -120,12 +133,24 @@ subprojects {
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'maven-publish'

dependencies {
api project(path: ':core')
implementation project(path: ':extensions')
}

it.afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
}
}
}
}

break

}

Expand Down

0 comments on commit 20e936d

Please sign in to comment.