Skip to content

Commit 20e936d

Browse files
committed
feat: add maven publish
1 parent 40a77ec commit 20e936d

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

build.gradle

+26-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ buildscript {
2929
dependencies {
3030
classpath 'com.android.tools.build:gradle:7.2.1'
3131
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
32-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
3332
}
3433
}
3534

@@ -72,6 +71,8 @@ subprojects {
7271
apply plugin: 'kotlin-android'
7372
apply plugin: 'kotlin-parcelize'
7473
apply plugin: 'kotlin-kapt'
74+
apply plugin: 'maven-publish'
75+
7576

7677
dependencies {
7778
testImplementation 'junit:junit:4.13.2'
@@ -99,6 +100,17 @@ subprojects {
99100
api "androidx.lifecycle:lifecycle-common-java8:$lifecycle"
100101
api "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle"
101102
}
103+
104+
it.afterEvaluate {
105+
publishing {
106+
publications {
107+
release(MavenPublication) {
108+
from components.release
109+
}
110+
}
111+
}
112+
}
113+
102114
break
103115

104116
case 'extensions':
@@ -108,6 +120,7 @@ subprojects {
108120
apply plugin: 'kotlin-android'
109121
apply plugin: 'kotlin-parcelize'
110122
apply plugin: 'kotlin-kapt'
123+
apply plugin: 'maven-publish'
111124

112125
dependencies {
113126
implementation project(path: ':core')
@@ -120,12 +133,24 @@ subprojects {
120133
apply plugin: 'kotlin-android'
121134
apply plugin: 'kotlin-parcelize'
122135
apply plugin: 'kotlin-kapt'
136+
apply plugin: 'maven-publish'
123137

124138
dependencies {
125139
api project(path: ':core')
126140
implementation project(path: ':extensions')
127141
}
128142

143+
it.afterEvaluate {
144+
publishing {
145+
publications {
146+
release(MavenPublication) {
147+
from components.release
148+
}
149+
}
150+
}
151+
}
152+
153+
break
129154

130155
}
131156

0 commit comments

Comments
 (0)