Skip to content

Commit

Permalink
⬆️ [Release] Release 1.0.0-alpha3 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
kittinunf authored Sep 6, 2020
1 parent cbe55be commit 1df7747
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 155 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Forge

[![jcenter](https://api.bintray.com/packages/kittinunf/maven/Forge/images/download.svg)](https://bintray.com/kittinunf/maven/Forge/_latestVersion)
[![Kotlin](https://img.shields.io/badge/Kotlin-1.3.30-blue.svg)](http://kotlinlang.org)
[![Build Status](https://travis-ci.org/kittinunf/Forge.svg?branch=master)](https://travis-ci.org/kittinunf/Forge)
[![Kotlin](https://img.shields.io/badge/Kotlin-1.3.40-blue.svg)](http://kotlinlang.org)
[![jcenter](https://api.bintray.com/packages/kittinunf/maven/Forge/images/download.svg)](https://bintray.com/kittinunf/maven/Forge/_latestVersion)
[![MavenCentral](https://maven-badges.herokuapp.com/maven-central/com.github.kittinunf.result/forge/badge.svg)](https://search.maven.org/search?q=g:com.github.kittinunf.forge)
[![Build Status](https://travis-ci.org/kittinunf/Forge.svg?branch=master)](https://travis-ci.org/kittinunf/Forge)
[![](https://jitpack.io/v/kittinunf/forge.svg)](https://jitpack.io/#kittinunf/forge/)
[![Codecov](https://codecov.io/github/kittinunf/Forge/coverage.svg?branch=master)](https://codecov.io/gh/kittinunf/Forge)

Expand Down
141 changes: 102 additions & 39 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.gradle.api.internal.artifacts.dsl.LazyPublishArtifact
import com.jfrog.bintray.gradle.BintrayExtension
import org.jmailen.gradle.kotlinter.support.ReporterType

plugins {
Expand Down Expand Up @@ -49,67 +49,130 @@ subprojects {
reporters = arrayOf(ReporterType.plain.name, ReporterType.checkstyle.name)
}

val sourcesJar by tasks.registering(Jar::class) {
from(sourceSets["main"].allSource)
archiveClassifier.set("sources")
}
val artifactRepo: String by project
val artifactName: String by project
val artifactDesc: String by project
val artifactUserOrg: String by project
val artifactUrl: String by project
val artifactScm: String by project
val artifactLicenseName: String by project
val artifactLicenseUrl: String by project

val doc by tasks.creating(Javadoc::class) {
isFailOnError = false
source = sourceSets["main"].allJava
}
val artifactPublish: String by project
val artifactGroupId: String by project
version = artifactPublish
group = artifactGroupId

val artifactVersion: String by project
val artifactGroup: String by project
version = artifactVersion
group = artifactGroup
//publishing
configure<PublishingExtension> {

bintray {
user = findProperty("BINTRAY_USER") as? String
key = findProperty("BINTRAY_KEY") as? String
setPublications(project.name)
with(pkg) {
repo = "maven"
name = "Forge"
desc = "Functional style JSON parsing written in Kotlin"
userOrg = "kittinunf"
websiteUrl = "https://github.com/kittinunf/Forge"
vcsUrl = "https://github.com/kittinunf/Forge"
setLicenses("MIT")
with(version) {
name = artifactVersion
}
val sourceSets = project.the<SourceSetContainer>()

val sourcesJar by tasks.registering(Jar::class) {
from(sourceSets["main"].allSource)
classifier = "sources"
}
}

val javadocJar by tasks.creating(Jar::class) {
val doc by tasks
dependsOn(doc)
from(doc)
val javadocJar by tasks.creating(Jar::class) {
val doc by tasks.creating(Javadoc::class) {
isFailOnError = false
source = sourceSets["main"].allJava
}

archiveClassifier.set("javadoc")
}
dependsOn(doc)
from(doc)

classifier = "javadoc"
}

publishing {
publications {
register(project.name, MavenPublication::class) {
from(components["java"])
artifact(LazyPublishArtifact(sourcesJar))
artifact(sourcesJar.get())
artifact(javadocJar)
groupId = artifactGroup
groupId = artifactGroupId
artifactId = project.name
version = artifactVersion
version = artifactPublish

pom {
name.set(project.name)
description.set(artifactDesc)

packaging = "jar"
url.set(artifactUrl)

licenses {
license {
name.set("MIT License")
url.set("http://www.opensource.org/licenses/mit-license.php")
}
}

developers {
developer {
name.set("kittinunf")
}
developer {
name.set("babedev")
}
developer {
name.set("janjaali")
}
}

contributors {
// https://github.com/kittinunf/Result/graphs/contributors
contributor {
name.set("pgreze")
}
}

scm {
url.set(artifactUrl)
connection.set(artifactScm)
developerConnection.set(artifactScm)
}
}
}
}
}

// bintray
configure<BintrayExtension> {
user = findProperty("BINTRAY_USER") as? String
key = findProperty("BINTRAY_KEY") as? String
setPublications(project.name)
publish = true
pkg.apply {
repo = artifactRepo
name = artifactName
desc = artifactDesc
userOrg = artifactUserOrg
websiteUrl = artifactUrl
vcsUrl = artifactUrl
setLicenses(artifactLicenseName)
version.apply {
name = artifactPublish
gpg(delegateClosureOf<BintrayExtension.GpgConfig> {
sign = true
passphrase = System.getenv("GPG_PASSPHRASE") ?: ""
})
}
}
}

// jacoco
configure<JacocoPluginExtension> {
toolVersion = extra.get("jacoco") as String
}

tasks.withType<JacocoReport> {
reports {
html.isEnabled = true
xml.isEnabled = true
csv.isEnabled = false
}
}
}

fun <T> NamedDomainObjectContainer<T>.release(configure: T.() -> Unit) = getByName("release", configure)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.github.kittinunf.forge.model.UserWithDogs
import com.github.kittinunf.forge.util.create
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.nullValue
import org.junit.Assert.assertThat
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test

class JSONMappingArrayTest : BaseTest() {
Expand Down
23 changes: 17 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,29 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.parallel=true

kotlinVersion=1.4.0

artifactVersion=1.0.0-alpha2
artifactGroup=com.github.kittinunf.forge
bintrayVersion=1.8.4
jacoco=0.8.5
jacocoVersion=0.8.3
jsonVersion=20190722
junitVersion=4.12
kotlinVersion=1.4.0
junitVersion=4.13
kotlinterVersion=3.0.2
resultVersion=3.1.0

artifactRepo=maven
artifactName=Forge
artifactDesc=Functional style JSON parsing in Kotlin
artifactUserOrg=kittinunf
artifactUrl=https://github.com/kittinunf/Forge
artifactScm=[email protected]:kittinunf/forge.git
artifactLicenseName=MIT License
artifactLicenseUrl=http://www.opensource.org/licenses/mit-license.php
artifactPublish=1.0.0-alpha3
artifactGroupId=com.github.kittinunf.forge

0 comments on commit 1df7747

Please sign in to comment.