Skip to content

Commit 80abaa2

Browse files
committed
Version 1.1.0 (#49)
- [Retrofit 2.5.0](https://github.com/square/retrofit/blob/parent-2.5.0/CHANGELOG.md#version-250-2018-11-18) - [kotlinx.coroutines 1.1.1](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.1.1) - Compiled against Kotlin 1.3.21 - Fixed javadoc and source code jars. Thanks to @erikhuizinga for contribution #47 - Gradle 5.2.1 - Update publishing config to new DSL
1 parent ae75654 commit 80abaa2

File tree

7 files changed

+70
-85
lines changed

7 files changed

+70
-85
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## Version 1.1.0 (2019-02-12)
4+
5+
- [Retrofit 2.5.0](https://github.com/square/retrofit/blob/parent-2.5.0/CHANGELOG.md#version-250-2018-11-18)
6+
- [kotlinx.coroutines 1.1.1](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.1.1)
7+
- Compiled against Kotlin 1.3.21
8+
- Fixed javadoc and source code jars. Thanks to @erikhuizinga for contribution #47
9+
310
## Version 1.0.0 (2018-12-19)
411

512
- kotlinx.coroutines 1.0.1

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Download the [JAR](https://bintray.com/gildor/maven/kotlin-coroutines-retrofit#f
1919
Gradle:
2020

2121
```groovy
22-
compile 'ru.gildor.coroutines:kotlin-coroutines-retrofit:1.0.0'
22+
compile 'ru.gildor.coroutines:kotlin-coroutines-retrofit:1.1.0'
2323
```
2424

2525
Maven:
@@ -28,7 +28,7 @@ Maven:
2828
<dependency>
2929
<groupId>ru.gildor.coroutines</groupId>
3030
<artifactId>kotlin-coroutines-retrofit</artifactId>
31-
<version>1.0.0</version>
31+
<version>1.1.0</version>
3232
</dependency>
3333
```
3434

build.gradle.kts

+57-80
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
import com.jfrog.bintray.gradle.BintrayExtension
2-
import com.jfrog.bintray.gradle.BintrayExtension.*
3-
import groovy.util.Node
1+
import com.jfrog.bintray.gradle.BintrayExtension.MavenCentralSyncConfig
2+
import com.jfrog.bintray.gradle.BintrayExtension.PackageConfig
3+
import com.jfrog.bintray.gradle.BintrayExtension.VersionConfig
44
import org.gradle.jvm.tasks.Jar
5-
import java.net.URL
65
import org.jetbrains.dokka.DokkaConfiguration
7-
import org.jetbrains.dokka.gradle.DokkaTask
8-
import org.jetbrains.dokka.gradle.LinkMapping
9-
import org.jetbrains.kotlin.builtins.isNumberedFunctionClassFqName
10-
import org.jetbrains.kotlin.gradle.dsl.Coroutines
11-
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformJvmPlugin
12-
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
6+
import java.net.URL
137

148
plugins {
15-
id("org.jetbrains.kotlin.jvm") version "1.3.11"
16-
id("com.jfrog.bintray") version "1.8.4"
179
jacoco
1810
`maven-publish`
19-
id("org.jetbrains.dokka") version "0.9.16"
11+
id("org.jetbrains.kotlin.jvm") version "1.3.21"
12+
id("com.jfrog.bintray") version "1.8.4"
13+
id("org.jetbrains.dokka") version "0.9.17"
2014
}
2115

2216
group = "ru.gildor.coroutines"
23-
version = "1.0.0"
17+
version = "1.1.0"
2418
description = "Provides Kotlin Coroutines suspendable await() extensions for Retrofit Call"
2519

2620
repositories {
@@ -34,33 +28,33 @@ java {
3428

3529
dependencies {
3630
compile("org.jetbrains.kotlin:kotlin-stdlib")
37-
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1")
38-
compile("com.squareup.retrofit2:retrofit:2.4.0")
31+
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1")
32+
compile("com.squareup.retrofit2:retrofit:2.5.0")
3933
testCompile("junit:junit:4.12")
4034
}
4135

4236
/* Code coverage */
4337

44-
val jacocoTestReport by tasks.getting(JacocoReport::class) {
45-
reports.xml.isEnabled = true
46-
}
47-
48-
val test by tasks.getting {
49-
finalizedBy(jacocoTestReport)
50-
}
38+
tasks {
39+
jacocoTestReport {
40+
reports.xml.isEnabled = true
41+
}
5142

52-
/* KDoc */
43+
test {
44+
finalizedBy(jacocoTestReport)
45+
}
5346

54-
val dokka by tasks.getting(DokkaTask::class) {
55-
outputFormat = "javadoc"
56-
outputDirectory = "$buildDir/javadoc"
47+
dokka {
48+
outputFormat = "javadoc"
49+
outputDirectory = "$buildDir/javadoc"
5750

58-
externalDocumentationLink(delegateClosureOf<DokkaConfiguration.ExternalDocumentationLink.Builder> {
59-
url = URL("https://square.github.io/okhttp/3.x/okhttp/")
60-
})
61-
externalDocumentationLink(delegateClosureOf<DokkaConfiguration.ExternalDocumentationLink.Builder> {
62-
url = URL("https://square.github.io/retrofit/2.x/retrofit/")
63-
})
51+
externalDocumentationLink(delegateClosureOf<DokkaConfiguration.ExternalDocumentationLink.Builder> {
52+
url = URL("https://square.github.io/okhttp/3.x/okhttp/")
53+
})
54+
externalDocumentationLink(delegateClosureOf<DokkaConfiguration.ExternalDocumentationLink.Builder> {
55+
url = URL("https://square.github.io/retrofit/2.x/retrofit/")
56+
})
57+
}
6458
}
6559

6660
/* Publishing */
@@ -74,51 +68,49 @@ val licenseName = "The Apache Software License, Version 2.0"
7468
val licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.txt"
7569
val releaseTag = "v${project.version}"
7670

77-
val sourcesJar by tasks.creating(Jar::class) {
71+
val sources = tasks.register<Jar>("sourcesJar") {
7872
dependsOn("classes")
7973
classifier = "sources"
8074
from(sourceSets["main"].allSource)
8175
}
8276

83-
val javadocJar by tasks.creating(Jar::class) {
84-
dependsOn(dokka)
77+
val javadoc = tasks.register<Jar>("javadocJar") {
78+
dependsOn(tasks.dokka)
8579
classifier = "javadoc"
8680
from("$buildDir/javadoc")
8781
}
8882

8983
publishing {
9084
publications {
91-
create("MavenJava", MavenPublication::class.java) {
85+
register<MavenPublication>("MavenJava") {
9286
from(components["java"])
93-
artifact(sourcesJar)
94-
artifact(javadocJar)
95-
pom.withXml {
96-
NodeScope(asNode()) {
97-
"name" to project.name
98-
"description" to project.description.toString()
99-
"url" to repoWeb
100-
"developers" {
101-
"developer" {
102-
"name" to "Andrey Mischenko"
103-
"email" to "[email protected]"
104-
"organizationUrl" to "https://github.com/gildor"
105-
}
106-
}
107-
"issueManagement" {
108-
"system" to "GitHub Issues"
109-
"url" to "$repoWeb/issues"
87+
artifact(sources.get())
88+
artifact(javadoc.get())
89+
pom {
90+
name.set(project.name)
91+
description.set(project.description)
92+
url.set(repoWeb)
93+
developers {
94+
developer {
95+
name.set("Andrey Mischenko")
96+
email.set("[email protected]")
97+
organizationUrl.set("https://github.com/gildor")
11098
}
111-
"scm" {
112-
"url" to repoWeb
113-
"connection" to "scm:git:$repoVcs"
114-
"developerConnection" to "scm:git:$repoVcs"
115-
"tag" to releaseTag
116-
}
117-
"licenses" {
118-
"license" {
119-
"name" to licenseName
120-
"url" to licenseUrl
121-
}
99+
}
100+
issueManagement {
101+
system.set("GitHub Issues")
102+
url.set("$repoWeb/issues")
103+
}
104+
scm {
105+
url.set(repoWeb)
106+
connection.set("scm:git:$repoVcs")
107+
developerConnection.set("scm:git:$repoVcs")
108+
tag.set(releaseTag)
109+
}
110+
licenses {
111+
license {
112+
name.set(licenseName)
113+
url.set(licenseUrl)
122114
}
123115
}
124116
}
@@ -154,18 +146,3 @@ bintray {
154146
})
155147
})
156148
}
157-
158-
/**
159-
* Helper DSL to define Pom
160-
*/
161-
class NodeScope(private val node: Node, block: NodeScope.() -> Unit) {
162-
init {
163-
block()
164-
}
165-
infix fun String.to(value: String) {
166-
node.appendNode(this, value)
167-
}
168-
operator fun String.invoke(block: NodeScope.() -> Unit) {
169-
node.appendNode(this).apply { NodeScope(this, block) }
170-
}
171-
}

gradle/wrapper/gradle-wrapper.jar

1.3 KB
Binary file not shown.
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
# suppress inspection "UnusedProperty" for whole file
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
2828
APP_BASE_NAME=`basename "$0"`
2929

3030
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
31+
DEFAULT_JVM_OPTS='"-Xmx64m"'
3232

3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"

gradlew.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
1414
set APP_HOME=%DIRNAME%
1515

1616
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
1818

1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome

0 commit comments

Comments
 (0)