Skip to content

Commit ffa0ee4

Browse files
authored
Version 0.10.0 (#36)
- [Retrofit 2.4.0](https://github.com/square/retrofit/blob/parent-2.4.0/CHANGELOG.md#version-240-2018-03-14) - [kotlinx.coroutines 0.22.5](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/0.22.5) - Compiled against Kotlin 1.2.40 - Migration of build.gradle to kotlin-dsl - Gradle 4.7 - Published proper javadoc
1 parent 046ddc5 commit ffa0ee4

8 files changed

+188
-134
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# CHANGELOG
22

3+
## Version 0.10.0 (2017-04-26)
4+
5+
- [Retrofit 2.4.0](https://github.com/square/retrofit/blob/parent-2.4.0/CHANGELOG.md#version-240-2018-03-14)
6+
- [kotlinx.coroutines 0.22.5](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/0.22.5)
7+
- Compiled against Kotlin 1.2.40
8+
- Migration of build.gradle to kotlin-dsl
9+
- Gradle 4.7
10+
- Published proper javadoc
11+
312
## Version 0.9.0 (2017-12-26)
413

514
- [kotlinx.coroutines 0.20](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/0.20)

README.md

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

1616
```groovy
17-
compile 'ru.gildor.coroutines:kotlin-coroutines-retrofit:0.9.0'
17+
compile 'ru.gildor.coroutines:kotlin-coroutines-retrofit:0.10.0'
1818
```
1919

2020
Maven:
@@ -23,7 +23,7 @@ Maven:
2323
<dependency>
2424
<groupId>ru.gildor.coroutines</groupId>
2525
<artifactId>kotlin-coroutines-retrofit</artifactId>
26-
<version>0.9.0</version>
26+
<version>0.10.0</version>
2727
</dependency>
2828
```
2929

build.gradle

-34
This file was deleted.

build.gradle.kts

+175
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
import com.jfrog.bintray.gradle.BintrayExtension
2+
import com.jfrog.bintray.gradle.BintrayExtension.*
3+
import groovy.util.Node
4+
import org.gradle.jvm.tasks.Jar
5+
import java.net.URL
6+
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
13+
14+
plugins {
15+
id("org.jetbrains.kotlin.jvm") version "1.2.40"
16+
id("com.jfrog.bintray") version "1.7.3"
17+
jacoco
18+
`maven-publish`
19+
id("org.jetbrains.dokka") version "0.9.16"
20+
}
21+
22+
group = "ru.gildor.coroutines"
23+
version = "0.10.0"
24+
description = "Provides Kotlin Coroutines suspendable await() extensions for Retrofit Call"
25+
26+
repositories {
27+
jcenter()
28+
}
29+
30+
java {
31+
targetCompatibility = JavaVersion.VERSION_1_6
32+
sourceCompatibility = JavaVersion.VERSION_1_6
33+
}
34+
35+
dependencies {
36+
compile("org.jetbrains.kotlin:kotlin-stdlib")
37+
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:0.22.5")
38+
compile("com.squareup.retrofit2:retrofit:2.4.0")
39+
testCompile("junit:junit:4.12")
40+
}
41+
42+
kotlin {
43+
experimental.coroutines = Coroutines.ENABLE
44+
}
45+
46+
/* Code coverage */
47+
48+
val jacocoTestReport by tasks.getting(JacocoReport::class) {
49+
reports.xml.isEnabled = true
50+
}
51+
52+
val test by tasks.getting {
53+
finalizedBy(jacocoTestReport)
54+
}
55+
56+
/* KDoc */
57+
58+
val dokka by tasks.getting(DokkaTask::class) {
59+
outputFormat = "javadoc"
60+
outputDirectory = "$buildDir/javadoc"
61+
62+
externalDocumentationLink(delegateClosureOf<DokkaConfiguration.ExternalDocumentationLink.Builder> {
63+
url = URL("https://square.github.io/okhttp/3.x/okhttp/")
64+
})
65+
externalDocumentationLink(delegateClosureOf<DokkaConfiguration.ExternalDocumentationLink.Builder> {
66+
url = URL("https://square.github.io/retrofit/2.x/retrofit/")
67+
})
68+
}
69+
70+
/* Publishing */
71+
72+
val githubId = "gildor/kotlin-coroutines-retrofit"
73+
val repoWeb = "https://github.com/$githubId"
74+
val repoVcs = "$repoWeb.git"
75+
val tags = listOf("retrofit", "kotlin", "coroutines")
76+
val licenseId = "Apache-2.0"
77+
val licenseName = "The Apache Software License, Version 2.0"
78+
val licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.txt"
79+
val releaseTag = "v${project.version}"
80+
81+
val sourcesJar by tasks.creating(Jar::class) {
82+
dependsOn("classes")
83+
classifier = "sources"
84+
from(java.sourceSets["main"].allSource)
85+
}
86+
87+
val javadocJar by tasks.creating(Jar::class) {
88+
dependsOn(dokka)
89+
classifier = "javadoc"
90+
from("$buildDir/javadoc")
91+
}
92+
93+
publishing {
94+
publications {
95+
create("MavenJava", MavenPublication::class.java) {
96+
from(components["java"])
97+
artifact(sourcesJar)
98+
artifact(javadocJar)
99+
pom.withXml {
100+
NodeScope(asNode()) {
101+
"name" to project.name
102+
"description" to project.description.toString()
103+
"url" to repoWeb
104+
"developers" {
105+
"developer" {
106+
"name" to "Andrey Mischenko"
107+
"email" to "[email protected]"
108+
"organizationUrl" to "https://github.com/gildor"
109+
}
110+
}
111+
"issueManagement" {
112+
"system" to "GitHub Issues"
113+
"url" to "$repoWeb/issues"
114+
}
115+
"scm" {
116+
"url" to repoWeb
117+
"connection" to "scm:git:$repoVcs"
118+
"developerConnection" to "scm:git:$repoVcs"
119+
"tag" to releaseTag
120+
}
121+
"licenses" {
122+
"license" {
123+
"name" to licenseName
124+
"url" to licenseUrl
125+
}
126+
}
127+
}
128+
}
129+
}
130+
}
131+
}
132+
133+
bintray {
134+
user = project.properties["bintray.user"]?.toString()
135+
key = project.properties["bintray.key"]?.toString()
136+
setPublications("MavenJava")
137+
publish = true
138+
pkg(delegateClosureOf<PackageConfig> {
139+
repo = project.properties["bintray.repo"]?.toString() ?: "maven"
140+
name = project.name
141+
desc = description
142+
githubRepo = githubId
143+
githubReleaseNotesFile = "CHANGELOG.md"
144+
websiteUrl = repoWeb
145+
issueTrackerUrl = "$repoWeb/issues"
146+
vcsUrl = repoVcs
147+
setLicenses(licenseId)
148+
setLabels(*tags.toTypedArray())
149+
version(delegateClosureOf<VersionConfig> {
150+
name = project.version.toString()
151+
vcsTag = releaseTag
152+
mavenCentralSync(delegateClosureOf<MavenCentralSyncConfig> {
153+
sync = project.properties["sonatype.user"] != null
154+
user = project.properties["sonatype.user"]?.toString()
155+
password = project.properties["sonatype.password"]?.toString()
156+
close = "true"
157+
})
158+
})
159+
})
160+
}
161+
162+
/**
163+
* Helper DSL to define Pom
164+
*/
165+
class NodeScope(private val node: Node, block: NodeScope.() -> Unit) {
166+
init {
167+
block()
168+
}
169+
infix fun String.to(value: String) {
170+
node.appendNode(this, value)
171+
}
172+
operator fun String.invoke(block: NodeScope.() -> Unit) {
173+
node.appendNode(this).apply { NodeScope(this, block) }
174+
}
175+
}

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip

publish.gradle

-96
This file was deleted.

settings.gradle

-1
This file was deleted.

settings.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "kotlin-coroutines-retrofit"

0 commit comments

Comments
 (0)