-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start publishing the library to maven central (#53)
* setup publishing * fix compose version * update Docs to use maven central infos * update doc link in README.md
- Loading branch information
1 parent
e700608
commit 5f377a8
Showing
4 changed files
with
59 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
id("maven-publish") | ||
id("io.gitlab.arturbosch.detekt") version "1.23.6" | ||
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.14.0" | ||
id("org.jetbrains.kotlin.plugin.compose") | ||
id("com.vanniktech.maven.publish") version "0.28.0" | ||
} | ||
|
||
android { | ||
|
@@ -54,24 +56,10 @@ dependencies { | |
implementation("androidx.core:core-ktx:1.13.1") | ||
implementation(platform("androidx.compose:compose-bom:2024.06.00")) | ||
implementation("androidx.appcompat:appcompat:1.7.0") | ||
implementation("androidx.compose.ui:ui") | ||
implementation("androidx.compose.ui:ui:1.6.8") | ||
testImplementation("junit:junit:4.13.2") | ||
} | ||
|
||
publishing { | ||
publications { | ||
register<MavenPublication>("release") { | ||
groupId = "com.github.devscast" | ||
artifactId = "validable" | ||
version = "2.0.0-alpha01" | ||
|
||
afterEvaluate { | ||
from(components["release"]) | ||
} | ||
} | ||
} | ||
} | ||
|
||
detekt { | ||
parallel = true | ||
|
||
|
@@ -84,4 +72,44 @@ detekt { | |
|
||
// Specifying a baseline file. All findings stored in this file in subsequent runs of detekt. | ||
baseline = file("$rootDir/detekt/baseline.xml") | ||
} | ||
|
||
|
||
mavenPublishing { | ||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) | ||
signAllPublications() | ||
|
||
coordinates("tech.devscast", "validable", "2.0.0-alpha01") | ||
|
||
pom { | ||
name.set("Validable") | ||
description.set("An easy-to-use text field validator for Kotlin & Jetpack compose.") | ||
inceptionYear.set("2021") | ||
url.set("https://github.com/devscast/validable") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("yveskalume") | ||
name.set("Yves Kalume") | ||
url.set("https://github.com/yveskalume") | ||
} | ||
developer { | ||
id.set("bernard-ng") | ||
name.set("Bernard Ngandu") | ||
url.set("https://github.com/bernard-ng") | ||
} | ||
} | ||
|
||
scm { | ||
url.set("https://github.com/devscast/validable") | ||
connection.set("scm:git:git://github.com/devscast/validable.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/devscast/validable.git") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ class ValidatorTest { | |
} | ||
|
||
@Test | ||
|
||
fun `test validator when input are valid`(){ | ||
val validable1 = EmailValidable() | ||
validable1.value = "[email protected]" | ||
|