Skip to content

Commit

Permalink
Merge pull request #21 from kimdohun0104/publish
Browse files Browse the repository at this point in the history
Publish
  • Loading branch information
kimdohun0104 authored May 10, 2021
2 parents 7aba930 + c49a97a commit bfe8971
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 8 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}

Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/java/dependencies/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ object Versions {
const val targetSdkVersion = 30

private const val majorVersion = 1
private const val minorVersion = 1
private const val minorVersion = 4
private const val patchVersion = 0
private const val postfix = "SNAPSHOT6"

const val versionCode = (100 * majorVersion) + (10 * minorVersion) + patchVersion
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionName = "$majorVersion.$minorVersion.$patchVersion-${postfix}"
}
14 changes: 14 additions & 0 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apply plugin: 'maven-publish'

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = "com.github.kimdohun0104.kinda"

artifactId = releaseArtifactId
}
}
}
}
7 changes: 5 additions & 2 deletions kinda-android-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import dependencies.Versions

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'

group = 'com.github.kimdohun0104.kinda'
apply from: rootProject.file('gradle/publish.gradle')

ext {
releaseArtifactId = "kinda-android-test"
}

android {
compileSdkVersion Versions.compileSdkVersion
Expand Down
7 changes: 5 additions & 2 deletions kinda-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import dependencies.Versions

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'

group = 'com.github.kimdohun0104.kinda'
apply from: rootProject.file('gradle/publish.gradle')

ext {
releaseArtifactId = "kinda-android"
}

android {
compileSdkVersion Versions.compileSdkVersion
Expand Down
14 changes: 13 additions & 1 deletion kinda-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
import dependencies.Deps
import dependencies.Versions

apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'

group = 'com.github.kimdohun0104.kinda'
afterEvaluate {
publishing {
publications {
mavenAar(MavenPublication) {
from components.java
groupId = "com.github.kimdohun0104.kinda"

artifactId = "kinda-core"
}
}
}
}

dependencies {
implementation Deps.Kotlin.coroutine
Expand Down

0 comments on commit bfe8971

Please sign in to comment.