Skip to content

Commit

Permalink
chore: setup maven publication
Browse files Browse the repository at this point in the history
  • Loading branch information
adrielcafe committed May 28, 2021
1 parent e4bbef3 commit e1f4756
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 25 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ buildscript {

subprojects {
apply plugin: 'org.jlleitschuh.gradle.ktlint'
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}
repositories {
google()
mavenCentral()
mavenLocal()
maven { url 'https://jitpack.io' }
}
}

Expand Down
21 changes: 19 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8

android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official

GROUP=cafe.adriel.lyricist
VERSION_NAME=0.0.1

POM_DESCRIPTION=The missing I18N/I10N library for Jetpack Compose!
POM_INCEPTION_YEAR=2021
POM_URL=https://github.com/adrielcafe/lyricist

POM_LICENCE_NAME=The MIT License
POM_LICENCE_URL=https://opensource.org/licenses/MIT
POM_LICENCE_DIST=repo

POM_SCM_URL=https://github.com/adrielcafe/lyricist
POM_SCM_CONNECTION=scm:git:git://github.com/lyricist/lyricist.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/lyricist/lyricist.git

kotlin.code.style=official
POM_DEVELOPER_ID=adrielcafe
POM_DEVELOPER_NAME=Adriel Café
POM_DEVELOPER_URL=https://github.com/adrielcafe/
5 changes: 4 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[versions]
plugin-android = "7.1.0-alpha01"
plugin-ktlint = "10.0.0"
plugin-maven = "0.15.1"

kotlin = "1.4.32"

ksp = "1.4.32-1.0.0-alpha08"
Expand All @@ -13,6 +15,7 @@ composeActivity = "1.3.0-alpha08"
[libraries]
plugin-android = { module = "com.android.tools.build:gradle", version.ref = "plugin-android" }
plugin-ktlint = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "plugin-ktlint" }
plugin-maven = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "plugin-maven" }
plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
plugin-ksp = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }

Expand All @@ -25,4 +28,4 @@ compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }

[bundles]
plugins = ["plugin-android", "plugin-ktlint", "plugin-kotlin", "plugin-ksp"]
plugins = ["plugin-android", "plugin-ktlint", "plugin-maven", "plugin-kotlin", "plugin-ksp"]
2 changes: 0 additions & 2 deletions jitpack.yml

This file was deleted.

2 changes: 2 additions & 0 deletions lyricist-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ dependencies {
implementation libs.ksp
implementation libs.caseFormat
}

apply plugin: "com.vanniktech.maven.publish"
3 changes: 3 additions & 0 deletions lyricist-processor/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Lyricist Processor
POM_ARTIFACT_ID=lyricist-processor
POM_PACKAGING=jar
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ internal class LyricistSymbolProcessor(
|package $PACKAGE_NAME
|
|import androidx.compose.runtime.Composable
|import androidx.compose.runtime.CompositionLocalProvider
|import androidx.compose.runtime.remember
|import androidx.compose.runtime.staticCompositionLocalOf
|import androidx.compose.ui.text.intl.Locale
|$packagesOutput
Expand Down
17 changes: 1 addition & 16 deletions lyricist/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
apply plugin: "com.android.library"
apply from: "../android-module.gradle"
apply plugin: "maven-publish"

android {
defaultConfig {
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
kotlinOptions {
freeCompilerArgs += '-Xexplicit-api=strict'
}
Expand All @@ -21,12 +14,4 @@ dependencies {
implementation libs.compose.ui
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
}
}
}
}
apply plugin: "com.vanniktech.maven.publish"
3 changes: 3 additions & 0 deletions lyricist/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Lyricist
POM_ARTIFACT_ID=lyricist
POM_PACKAGING=aar

0 comments on commit e1f4756

Please sign in to comment.