Skip to content

Commit 1df7747

Browse files
authored
⬆️ [Release] Release 1.0.0-alpha3 (#32)
1 parent cbe55be commit 1df7747

File tree

5 files changed

+124
-155
lines changed

5 files changed

+124
-155
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Forge
22

3-
[![jcenter](https://api.bintray.com/packages/kittinunf/maven/Forge/images/download.svg)](https://bintray.com/kittinunf/maven/Forge/_latestVersion)
4-
[![Kotlin](https://img.shields.io/badge/Kotlin-1.3.30-blue.svg)](http://kotlinlang.org)
5-
[![Build Status](https://travis-ci.org/kittinunf/Forge.svg?branch=master)](https://travis-ci.org/kittinunf/Forge)
3+
[![Kotlin](https://img.shields.io/badge/Kotlin-1.3.40-blue.svg)](http://kotlinlang.org)
4+
[![jcenter](https://api.bintray.com/packages/kittinunf/maven/Forge/images/download.svg)](https://bintray.com/kittinunf/maven/Forge/_latestVersion)
5+
[![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)
6+
[![Build Status](https://travis-ci.org/kittinunf/Forge.svg?branch=master)](https://travis-ci.org/kittinunf/Forge)
67
[![](https://jitpack.io/v/kittinunf/forge.svg)](https://jitpack.io/#kittinunf/forge/)
78
[![Codecov](https://codecov.io/github/kittinunf/Forge/coverage.svg?branch=master)](https://codecov.io/gh/kittinunf/Forge)
89

build.gradle.kts

Lines changed: 102 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import org.gradle.api.internal.artifacts.dsl.LazyPublishArtifact
1+
import com.jfrog.bintray.gradle.BintrayExtension
22
import org.jmailen.gradle.kotlinter.support.ReporterType
33

44
plugins {
@@ -49,67 +49,130 @@ subprojects {
4949
reporters = arrayOf(ReporterType.plain.name, ReporterType.checkstyle.name)
5050
}
5151

52-
val sourcesJar by tasks.registering(Jar::class) {
53-
from(sourceSets["main"].allSource)
54-
archiveClassifier.set("sources")
55-
}
52+
val artifactRepo: String by project
53+
val artifactName: String by project
54+
val artifactDesc: String by project
55+
val artifactUserOrg: String by project
56+
val artifactUrl: String by project
57+
val artifactScm: String by project
58+
val artifactLicenseName: String by project
59+
val artifactLicenseUrl: String by project
5660

57-
val doc by tasks.creating(Javadoc::class) {
58-
isFailOnError = false
59-
source = sourceSets["main"].allJava
60-
}
61+
val artifactPublish: String by project
62+
val artifactGroupId: String by project
63+
version = artifactPublish
64+
group = artifactGroupId
6165

62-
val artifactVersion: String by project
63-
val artifactGroup: String by project
64-
version = artifactVersion
65-
group = artifactGroup
66+
//publishing
67+
configure<PublishingExtension> {
6668

67-
bintray {
68-
user = findProperty("BINTRAY_USER") as? String
69-
key = findProperty("BINTRAY_KEY") as? String
70-
setPublications(project.name)
71-
with(pkg) {
72-
repo = "maven"
73-
name = "Forge"
74-
desc = "Functional style JSON parsing written in Kotlin"
75-
userOrg = "kittinunf"
76-
websiteUrl = "https://github.com/kittinunf/Forge"
77-
vcsUrl = "https://github.com/kittinunf/Forge"
78-
setLicenses("MIT")
79-
with(version) {
80-
name = artifactVersion
81-
}
69+
val sourceSets = project.the<SourceSetContainer>()
70+
71+
val sourcesJar by tasks.registering(Jar::class) {
72+
from(sourceSets["main"].allSource)
73+
classifier = "sources"
8274
}
83-
}
8475

85-
val javadocJar by tasks.creating(Jar::class) {
86-
val doc by tasks
87-
dependsOn(doc)
88-
from(doc)
76+
val javadocJar by tasks.creating(Jar::class) {
77+
val doc by tasks.creating(Javadoc::class) {
78+
isFailOnError = false
79+
source = sourceSets["main"].allJava
80+
}
8981

90-
archiveClassifier.set("javadoc")
91-
}
82+
dependsOn(doc)
83+
from(doc)
84+
85+
classifier = "javadoc"
86+
}
9287

93-
publishing {
9488
publications {
9589
register(project.name, MavenPublication::class) {
9690
from(components["java"])
97-
artifact(LazyPublishArtifact(sourcesJar))
91+
artifact(sourcesJar.get())
9892
artifact(javadocJar)
99-
groupId = artifactGroup
93+
groupId = artifactGroupId
10094
artifactId = project.name
101-
version = artifactVersion
95+
version = artifactPublish
96+
10297
pom {
98+
name.set(project.name)
99+
description.set(artifactDesc)
100+
101+
packaging = "jar"
102+
url.set(artifactUrl)
103+
103104
licenses {
104105
license {
105106
name.set("MIT License")
106107
url.set("http://www.opensource.org/licenses/mit-license.php")
107108
}
108109
}
110+
111+
developers {
112+
developer {
113+
name.set("kittinunf")
114+
}
115+
developer {
116+
name.set("babedev")
117+
}
118+
developer {
119+
name.set("janjaali")
120+
}
121+
}
122+
123+
contributors {
124+
// https://github.com/kittinunf/Result/graphs/contributors
125+
contributor {
126+
name.set("pgreze")
127+
}
128+
}
129+
130+
scm {
131+
url.set(artifactUrl)
132+
connection.set(artifactScm)
133+
developerConnection.set(artifactScm)
134+
}
109135
}
110136
}
111137
}
112138
}
139+
140+
// bintray
141+
configure<BintrayExtension> {
142+
user = findProperty("BINTRAY_USER") as? String
143+
key = findProperty("BINTRAY_KEY") as? String
144+
setPublications(project.name)
145+
publish = true
146+
pkg.apply {
147+
repo = artifactRepo
148+
name = artifactName
149+
desc = artifactDesc
150+
userOrg = artifactUserOrg
151+
websiteUrl = artifactUrl
152+
vcsUrl = artifactUrl
153+
setLicenses(artifactLicenseName)
154+
version.apply {
155+
name = artifactPublish
156+
gpg(delegateClosureOf<BintrayExtension.GpgConfig> {
157+
sign = true
158+
passphrase = System.getenv("GPG_PASSPHRASE") ?: ""
159+
})
160+
}
161+
}
162+
}
163+
164+
// jacoco
165+
configure<JacocoPluginExtension> {
166+
toolVersion = extra.get("jacoco") as String
167+
}
168+
169+
tasks.withType<JacocoReport> {
170+
reports {
171+
html.isEnabled = true
172+
xml.isEnabled = true
173+
csv.isEnabled = false
174+
}
175+
}
113176
}
114177

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

forge/src/test/kotlin/com/github/kittinunf/forge/DeserializedResultTest.kt

Lines changed: 0 additions & 106 deletions
This file was deleted.

forge/src/test/kotlin/com/github/kittinunf/forge/JSONMappingArrayTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import com.github.kittinunf.forge.model.UserWithDogs
1717
import com.github.kittinunf.forge.util.create
1818
import org.hamcrest.CoreMatchers.equalTo
1919
import org.hamcrest.CoreMatchers.nullValue
20-
import org.junit.Assert.assertThat
20+
import org.hamcrest.MatcherAssert.assertThat
2121
import org.junit.Test
2222

2323
class JSONMappingArrayTest : BaseTest() {

gradle.properties

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,29 @@
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
99
# Default value: -Xmx10248m -XX:MaxPermSize=256m
10-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10+
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1111
# When configured, Gradle will run in incubating parallel mode.
1212
# This option should only be used with decoupled projects. More details, visit
1313
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14-
# org.gradle.parallel=true
14+
org.gradle.parallel=true
15+
16+
kotlinVersion=1.4.0
1517

16-
artifactVersion=1.0.0-alpha2
17-
artifactGroup=com.github.kittinunf.forge
1818
bintrayVersion=1.8.4
19+
jacoco=0.8.5
1920
jacocoVersion=0.8.3
2021
jsonVersion=20190722
21-
junitVersion=4.12
22-
kotlinVersion=1.4.0
22+
junitVersion=4.13
2323
kotlinterVersion=3.0.2
2424
resultVersion=3.1.0
25+
26+
artifactRepo=maven
27+
artifactName=Forge
28+
artifactDesc=Functional style JSON parsing in Kotlin
29+
artifactUserOrg=kittinunf
30+
artifactUrl=https://github.com/kittinunf/Forge
31+
artifactScm=git@github.com:kittinunf/forge.git
32+
artifactLicenseName=MIT License
33+
artifactLicenseUrl=http://www.opensource.org/licenses/mit-license.php
34+
artifactPublish=1.0.0-alpha3
35+
artifactGroupId=com.github.kittinunf.forge

0 commit comments

Comments
 (0)