Skip to content

Commit

Permalink
Add source code when publish artifacts (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Jul 1, 2021
1 parent dad7a05 commit 08620c9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 32 deletions.
12 changes: 8 additions & 4 deletions beckon-rx2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'

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


android {
compileSdkVersion 30

Expand All @@ -12,7 +11,6 @@ android {
targetSdkVersion 30
buildToolsVersion = "30.0.2"
versionCode 1
versionName "0.3.0"

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

Expand Down Expand Up @@ -104,10 +102,16 @@ afterEvaluate {
publications {
debug(MavenPublication) {
from components.release
groupId = 'com.technocreatives.beckon-android'
groupId = findProperty("GROUP")
artifactId = 'beckon-rx2'
version = '0.3.0'
version = findProperty("VERSION_NAME")
artifact(sourceJar)
}
}
}
}

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}
25 changes: 12 additions & 13 deletions beckon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ android {
targetSdkVersion 30
buildToolsVersion = "30.0.2"
versionCode 1
versionName "0.3.0"

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

Expand Down Expand Up @@ -84,14 +83,10 @@ dependencies {
api 'androidx.core:core-ktx:1.6.0-beta02'
api 'androidx.annotation:annotation:1.3.0-alpha01'

// RxJava
// api "io.reactivex.rxjava2:rxjava:$rxJava"
// api "io.reactivex.rxjava2:rxandroid:$rxAndroid"

// Bluetooth
api "no.nordicsemi.android.support.v18:scanner:$nsScannerVersion"
api "no.nordicsemi.android:ble:$nsBleVersion"
api "no.nordicsemi.android:dfu:${nsDfuVersion}"
api "no.nordicsemi.android:dfu:$nsDfuVersion"

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

// Arrows
// implementation "com.github.lenguyenthanh:RxArrow:$rxarrow"

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
// implementation("org.jetbrains.kotlinx:kotlinx-coroutines-rx2:1.5.0")

// Arrows
implementation(platform("io.arrow-kt:arrow-stack:$arrow_version"))
implementation("io.arrow-kt:arrow-core")
implementation("io.arrow-kt:arrow-fx-coroutines")
Expand Down Expand Up @@ -144,11 +137,17 @@ afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.debug
groupId = 'com.technocreatives.beckon-android'
from components.release
groupId = findProperty("GROUP")
artifactId = 'beckon'
version = '0.3.0'
version = findProperty("VERSION_NAME")
artifact(sourceJar)
}
}
}
}

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}
15 changes: 0 additions & 15 deletions beckon/src/main/java/com/technocreatives/beckon/util/Rx.kt

This file was deleted.

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

buildscript {
ext.VERSION = '0.3.0'
// all library versions
ext.rxJava = '2.2.8'
ext.rxAndroid = '2.1.1'
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

GROUP=com.technocreatives.beckon-android
VERSION_NAME=0.3.0

0 comments on commit 08620c9

Please sign in to comment.