Skip to content

Commit 5503e1f

Browse files
committed
Migrate to Gradle Kotlin DSL
1 parent 1907f67 commit 5503e1f

File tree

4 files changed

+94
-54
lines changed

4 files changed

+94
-54
lines changed

build.gradle

-53
This file was deleted.

build.gradle.kts

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
@file:Suppress("UNUSED_VARIABLE", "HasPlatformType")
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
}
7+
}
8+
9+
plugins {
10+
kotlin("jvm") version "1.3.40"
11+
id("maven-publish")
12+
}
13+
14+
repositories {
15+
jcenter()
16+
}
17+
18+
group = "io.reactivex.rxjava2"
19+
version = "2.4.0-SNAPSHOT"
20+
21+
sourceSets {
22+
val examples by creating {
23+
java {
24+
compileClasspath += sourceSets.main.get().output
25+
runtimeClasspath += sourceSets.main.get().output
26+
}
27+
}
28+
}
29+
30+
val examplesImplementation by configurations.getting {
31+
extendsFrom(configurations.implementation.get())
32+
}
33+
34+
dependencies {
35+
implementation("io.reactivex.rxjava2:rxjava:2.2.10")
36+
implementation("org.jetbrains.kotlin:kotlin-stdlib")
37+
38+
testImplementation("org.funktionale:funktionale-partials:1.0.0-final")
39+
testImplementation("junit:junit:4.12")
40+
testImplementation("org.mockito:mockito-core:1.10.19")
41+
42+
examplesImplementation("com.squareup.retrofit2:retrofit:2.6.0")
43+
examplesImplementation("com.squareup.retrofit2:adapter-rxjava2:2.6.0")
44+
examplesImplementation("com.squareup.retrofit2:converter-moshi:2.6.0")
45+
}
46+
47+
val sourcesJar by tasks.creating(Jar::class) {
48+
from(sourceSets.main.get().allSource)
49+
archiveClassifier.set("sources")
50+
}
51+
52+
publishing {
53+
publications {
54+
create<MavenPublication>("full") {
55+
artifactId = "rxkotlin"
56+
57+
from(components["java"])
58+
artifact(sourcesJar)
59+
60+
pom {
61+
name.set("RxKotlin")
62+
description.set("RxJava bindings for Kotlin")
63+
url.set("https://github.com/ReactiveX/RxKotlin")
64+
65+
licenses {
66+
license {
67+
name.set("The Apache License, Version 2.0")
68+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
69+
}
70+
}
71+
}
72+
}
73+
}
74+
repositories {
75+
//todo
76+
/*maven {
77+
// change URLs to point to your repos, e.g. http://my.org/repo
78+
val releasesRepoUrl = uri("...")
79+
val snapshotsRepoUrl = uri("...")
80+
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
81+
}*/
82+
}
83+
}
84+
85+
// support for snapshot/final releases with the various branches RxJava uses
86+
//nebulaRelease {
87+
// addReleaseBranchPattern(/\d+\.\d+\.\d+/)
88+
// addReleaseBranchPattern('HEAD')
89+
//}
90+
91+
//if (project.hasProperty('release.useLastTag')) {
92+
// tasks.prepare.enabled = false
93+
//}

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="rxkotlin"

0 commit comments

Comments
 (0)