File tree Expand file tree Collapse file tree 5 files changed +101
-13
lines changed
Expand file tree Collapse file tree 5 files changed +101
-13
lines changed Original file line number Diff line number Diff line change 11# KNIO2
22Just some [ Kotlinx coroutines] ( https://kotlinlang.org/docs/reference/coroutines/coroutines-guide.html ) extensions for ` java.nio.channels.Asynchronous* ` classes.
33
4+ ## Setup
5+
6+ Gradle,
7+
8+ ``` groovy
9+ repositories {
10+ jcenter()
11+ }
12+
13+ dependencies {
14+ def knio2Version = '0.1.0'
15+ implementation "io.github.agcom:knio2:$knio2Version"
16+ }
17+ ```
18+
19+ For Maven and Ivy snippets, see the [ distribution page] ( https://bintray.com/agcom/knio2/lib ) .
20+
421## Components
522
623- Suspending extension functions for following classes,
Original file line number Diff line number Diff line change @@ -7,12 +7,7 @@ subprojects {
77 apply plugin : ' kotlin'
88
99 group = ' io.github.agcom'
10- version = ' 0.0.0'
11-
12- dependencies {
13- implementation platform(' org.jetbrains.kotlin:kotlin-bom' )
14- implementation platform(" org.jetbrains.kotlinx:kotlinx-coroutines-bom:$kotlinxCoroutinesVersion " )
15- }
10+ version = ' 0.1.0'
1611
1712 compileKotlin {
1813 kotlinOptions {
@@ -27,8 +22,6 @@ subprojects {
2722 }
2823
2924 java {
30- toolchain {
31- languageVersion = JavaLanguageVersion . of(' 11' )
32- }
25+ sourceCompatibility = JavaVersion . VERSION_11
3326 }
3427}
Original file line number Diff line number Diff line change 11kotlinVersion = 1.4.21
22kotestVersion = 4.3.2
3- kotlinxCoroutinesVersion = 1.4.2
3+ kotlinxCoroutinesVersion = 1.4.2
4+ bintrayVersion = 1.8.5
Original file line number Diff line number Diff line change 11plugins {
22 id ' java-library'
3+ id ' maven-publish'
4+ id ' com.jfrog.bintray' version " $bintrayVersion "
35}
46
57dependencies {
6- api ' org.jetbrains.kotlinx:kotlinx-coroutines-core'
7- testImplementation " io.kotest:kotest-runner-junit5:$kotestVersion "
8- testImplementation " io.kotest:kotest-assertions-core:$kotestVersion "
8+ api " org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion "
99}
1010
1111kotlin {
@@ -14,4 +14,43 @@ kotlin {
1414
1515test {
1616 useJUnitPlatform()
17+ }
18+
19+ java {
20+ withSourcesJar()
21+ withJavadocJar()
22+ }
23+
24+ publishing {
25+ publications {
26+ lib(MavenPublication ) {
27+ artifactId = " knio2"
28+ from components. java
29+ pom {
30+ packaging = ' jar'
31+ withXml {
32+ def root = asNode()
33+ new XmlParser (). parse(buildFile. toPath(). parent. resolve(' pom-extra.xml' ). toFile()). each {
34+ root. append(it)
35+ }
36+ }
37+ }
38+ }
39+ }
40+ }
41+
42+ bintray {
43+ user = ' agcom'
44+ key = System . env. BINTRAY_KEY
45+ publications = [' lib' ]
46+ pkg {
47+ repo = ' knio2'
48+ name = ' lib'
49+ version {
50+ name = project. version. toString()
51+ desc = ' First pre-release'
52+ released = new Date ()
53+ vcsTag = " v${ project.version} "
54+ }
55+ }
1756}
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <extra >
3+ <name >knio2</name >
4+ <description >Kotlinx coroutines extensions for Java NIO.2</description >
5+ <url >https://github.com/agcom/knio2</url >
6+ <inceptionYear >2021</inceptionYear >
7+ <licenses >
8+ <license >
9+ <name >Apache License 2.0</name >
10+ <url >http://www.apache.org/licenses/LICENSE-2.0.txt</url >
11+ <distribution >repo</distribution >
12+ </license >
13+ </licenses >
14+ <developers >
15+ <developer >
16+ <id >agcom</id >
17+ <name >Alireza Ghasemi</name >
18+ <email >agcombest@gmail.com</email >
19+ <url >https://github.com/agcom</url >
20+ </developer >
21+ </developers >
22+ <scm >
23+ <connection >https://github.com/agcom/knio2.git</connection >
24+ <developerConnection >https://github.com/agcom/knio2.git</developerConnection >
25+ <url >https://github.com/agcom/knio2</url >
26+ </scm >
27+ <issueManagement >
28+ <system >Github Issues</system >
29+ <url >https://github.com/agcom/knio2/issues</url >
30+ </issueManagement >
31+ <ciManagement >
32+ <system >Github Actions</system >
33+ <url >https://github.com/agcom/knio2/actions</url >
34+ </ciManagement >
35+ <distributionManagement >
36+ <downloadUrl >https://bintray.com/agcom/knio2/lib</downloadUrl >
37+ </distributionManagement >
38+ </extra >
You can’t perform that action at this time.
0 commit comments