Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.

Commit e224a14

Browse files
committed
chore: add maven-publish plugin for releases
1 parent 998803f commit e224a14

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

database/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ android {
1111
minSdkVersion 21
1212
targetSdkVersion 30
1313
versionCode 1
14-
versionName "1.0"
14+
versionName "1.0.0-beta01"
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
consumerProguardFiles "consumer-rules.pro"

firestore/build.gradle

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'com.android.library'
33
id 'kotlin-android'
4+
id 'maven-publish'
45
}
56

67
android {
@@ -11,7 +12,7 @@ android {
1112
minSdkVersion 21
1213
targetSdkVersion 30
1314
versionCode 1
14-
versionName "1.0"
15+
versionName "1.0.0-beta01"
1516

1617
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1718
consumerProguardFiles "consumer-rules.pro"
@@ -37,6 +38,33 @@ android {
3738
composeOptions {
3839
kotlinCompilerExtensionVersion compose_version
3940
}
41+
42+
afterEvaluate {
43+
publishing {
44+
publications {
45+
// Creates a Maven publication called "release".
46+
release(MavenPublication) {
47+
// Applies the component for the release build variant.
48+
from components.release
49+
50+
// You can then customize attributes of the publication as shown below.
51+
groupId = 'com.github.rosariopfernandes'
52+
artifactId = 'firestore'
53+
version = '1.0.0-beta01'
54+
}
55+
// Creates a Maven publication called “debug”.
56+
debug(MavenPublication) {
57+
// Applies the component for the debug build variant.
58+
from components.debug
59+
60+
groupId = 'com.github.rosariopfernandes'
61+
artifactId = 'firestore-debug'
62+
version = '1.0.0-beta01'
63+
}
64+
}
65+
}
66+
67+
}
4068
}
4169

4270
dependencies {

0 commit comments

Comments
 (0)