Skip to content

Commit 08620c9

Browse files
Add source code when publish artifacts (#13)
1 parent dad7a05 commit 08620c9

File tree

5 files changed

+23
-32
lines changed

5 files changed

+23
-32
lines changed

beckon-rx2/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
33

44
group='com.github.technocreatives.beckon-android'
55

6-
76
android {
87
compileSdkVersion 30
98

@@ -12,7 +11,6 @@ android {
1211
targetSdkVersion 30
1312
buildToolsVersion = "30.0.2"
1413
versionCode 1
15-
versionName "0.3.0"
1614

1715
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1816

@@ -104,10 +102,16 @@ afterEvaluate {
104102
publications {
105103
debug(MavenPublication) {
106104
from components.release
107-
groupId = 'com.technocreatives.beckon-android'
105+
groupId = findProperty("GROUP")
108106
artifactId = 'beckon-rx2'
109-
version = '0.3.0'
107+
version = findProperty("VERSION_NAME")
108+
artifact(sourceJar)
110109
}
111110
}
112111
}
112+
}
113+
114+
task sourceJar(type: Jar) {
115+
from android.sourceSets.main.java.srcDirs
116+
classifier "sources"
113117
}

beckon/build.gradle

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ android {
1313
targetSdkVersion 30
1414
buildToolsVersion = "30.0.2"
1515
versionCode 1
16-
versionName "0.3.0"
1716

1817
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1918

@@ -84,14 +83,10 @@ dependencies {
8483
api 'androidx.core:core-ktx:1.6.0-beta02'
8584
api 'androidx.annotation:annotation:1.3.0-alpha01'
8685

87-
// RxJava
88-
// api "io.reactivex.rxjava2:rxjava:$rxJava"
89-
// api "io.reactivex.rxjava2:rxandroid:$rxAndroid"
90-
9186
// Bluetooth
9287
api "no.nordicsemi.android.support.v18:scanner:$nsScannerVersion"
9388
api "no.nordicsemi.android:ble:$nsBleVersion"
94-
api "no.nordicsemi.android:dfu:${nsDfuVersion}"
89+
api "no.nordicsemi.android:dfu:$nsDfuVersion"
9590

9691
// Code quality tools
9792
ktlint "com.pinterest:ktlint:$ktlint_version"
@@ -101,11 +96,9 @@ dependencies {
10196
kapt("com.squareup.moshi:moshi-kotlin-codegen:$moshi")
10297
implementation "com.github.lenguyenthanh:simpleredux:7420d4da2f"
10398

104-
// Arrows
105-
// implementation "com.github.lenguyenthanh:RxArrow:$rxarrow"
106-
10799
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
108-
// implementation("org.jetbrains.kotlinx:kotlinx-coroutines-rx2:1.5.0")
100+
101+
// Arrows
109102
implementation(platform("io.arrow-kt:arrow-stack:$arrow_version"))
110103
implementation("io.arrow-kt:arrow-core")
111104
implementation("io.arrow-kt:arrow-fx-coroutines")
@@ -144,11 +137,17 @@ afterEvaluate {
144137
publishing {
145138
publications {
146139
release(MavenPublication) {
147-
from components.debug
148-
groupId = 'com.technocreatives.beckon-android'
140+
from components.release
141+
groupId = findProperty("GROUP")
149142
artifactId = 'beckon'
150-
version = '0.3.0'
143+
version = findProperty("VERSION_NAME")
144+
artifact(sourceJar)
151145
}
152146
}
153147
}
148+
}
149+
150+
task sourceJar(type: Jar) {
151+
from android.sourceSets.main.java.srcDirs
152+
classifier "sources"
154153
}

beckon/src/main/java/com/technocreatives/beckon/util/Rx.kt

Lines changed: 0 additions & 15 deletions
This file was deleted.

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4+
ext.VERSION = '0.3.0'
45
// all library versions
56
ext.rxJava = '2.2.8'
67
ext.rxAndroid = '2.1.1'

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ android.enableJetifier=true
2121
# Kotlin code style for this project: "official" or "obsolete":
2222
kotlin.code.style=official
2323

24+
GROUP=com.technocreatives.beckon-android
25+
VERSION_NAME=0.3.0

0 commit comments

Comments
 (0)