-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Floern/feature/mavencentral-release
Publish to Maven Central
- Loading branch information
Showing
5 changed files
with
65 additions
and
67 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,83 +1,45 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
val artifactGroup = "com.floern.castingcsv" | ||
val artifactName = "casting-csv-kt" | ||
val artifactVersion = "1.1" | ||
val publicationName = "release" | ||
|
||
buildscript { | ||
dependencies { | ||
classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin") | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
plugins { | ||
kotlin("jvm") version "1.4.10" | ||
id("com.jfrog.bintray") version "1.8.5" | ||
id("maven-publish") | ||
kotlin("jvm") version "1.5.31" | ||
id("com.vanniktech.maven.publish") version "0.18.0" | ||
} | ||
|
||
group = artifactGroup | ||
version = artifactVersion | ||
val GROUP: String by project | ||
val VERSION_NAME: String by project | ||
|
||
group = GROUP | ||
version = VERSION_NAME | ||
|
||
kotlin { | ||
explicitApi() | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
} | ||
val compileKotlin: KotlinCompile by tasks | ||
compileKotlin.kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
|
||
val compileTestKotlin: KotlinCompile by tasks | ||
compileTestKotlin.kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.10") | ||
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:0.11.1") | ||
|
||
testImplementation(kotlin("test-junit")) | ||
} | ||
implementation(kotlin("stdlib-jdk8")) | ||
implementation(kotlin("reflect")) | ||
|
||
val sourcesJar by tasks.creating(Jar::class) { | ||
archiveClassifier.set("sources") | ||
from(sourceSets.main.get().allSource) | ||
} | ||
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:1.2.0") | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>(publicationName) { | ||
groupId = artifactGroup | ||
artifactId = artifactName | ||
version = artifactVersion | ||
from(components["java"]) | ||
artifact(sourcesJar) | ||
} | ||
} | ||
testImplementation(kotlin("test-junit")) | ||
} | ||
|
||
bintray { | ||
user = findProperty("bintrayUser") as String? | ||
key = findProperty("bintrayKey") as String? | ||
|
||
setPublications(publicationName) | ||
publish = true | ||
|
||
pkg.apply { | ||
repo = "maven" | ||
name = artifactName | ||
vcsUrl = "https://github.com/Floern/casting-csv-kt.git" | ||
websiteUrl = "https://github.com/Floern/casting-csv-kt" | ||
issueTrackerUrl = "https://github.com/Floern/casting-csv-kt/issues" | ||
githubRepo = "Floern/casting-csv-kt" | ||
githubReleaseNotesFile = "README.md" | ||
setLicenses("Apache-2.0") | ||
setLabels("kotlin", "csv") | ||
|
||
version.apply { | ||
name = artifactVersion | ||
} | ||
} | ||
} |
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 +1,31 @@ | ||
kotlin.code.style=official | ||
|
||
# Artifact metadata | ||
GROUP=com.floern.castingcsv | ||
POM_ARTIFACT_ID=casting-csv-kt | ||
VERSION_NAME=1.2 | ||
|
||
# POM metadata | ||
POM_NAME=casting-csv-kt | ||
POM_PACKAGING=jar | ||
POM_DESCRIPTION=Read and write CSV directly from and to Kotlin data classes. | ||
POM_INCEPTION_YEAR=2020 | ||
|
||
# POM URLs | ||
POM_URL=https://github.com/Floern/casting-csv-kt | ||
POM_SCM_URL=https://github.com/Floern/casting-csv-kt | ||
POM_SCM_CONNECTION=scm:[email protected]:Floern/casting-csv-kt.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:Floern/casting-csv-kt.git | ||
|
||
# License information | ||
POM_LICENCE_NAME=License | ||
POM_LICENCE_URL=https://github.com/Floern/casting-csv-kt/blob/main/LICENSE | ||
POM_LICENCE_DIST=repo | ||
|
||
# Developer information | ||
POM_DEVELOPER_ID=Floern | ||
POM_DEVELOPER_NAME=Floern | ||
POM_DEVELOPER_URL=https://floern.com/ | ||
|
||
# Sonatype metadata | ||
SONATYPE_STAGING_PROFILE=com.floern |
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,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |