File tree Expand file tree Collapse file tree 7 files changed +36
-23
lines changed
kotlinx.interval.datetime Expand file tree Collapse file tree 7 files changed +36
-23
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ val size: Duration = interval.size // 100 seconds
3131This library includes a generic base class ` Interval<T, TSize> ` which can be used to create intervals for any type.
3232To achieve this, it directs type operations to ` IntervalTypeOperations ` which the constructor takes as a parameter.
3333
34- The following interval types are included in ` io.github.whathecode.kotlinx.interval:kotlinx. interval ` on Maven:
34+ The following interval types are included in ` io.github.whathecode.kotlinx.interval:kotlinx- interval ` on Maven:
3535
3636| Type | Values (` T ` ) | Distances (` TSize ` ) |
3737| :----------------:| :------------:| :-------------------:|
@@ -49,4 +49,4 @@ The following interval types are included in `io.github.whathecode.kotlinx.inter
4949
5050### Date/time intervals
5151Date/time intervals are implemented as ` InstantInterval ` using the [ kotlinx datetime] ( https://github.com/Kotlin/kotlinx-datetime ) library.
52- Since you may not always want to pull in this dependency, this class is published separately in ` io.github.whathecode.kotlinx.interval:kotlinx. interval. datetime ` .
52+ Since you may not always want to pull in this dependency, this class is published separately in ` io.github.whathecode.kotlinx.interval:kotlinx- interval- datetime ` .
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ val publishPropertiesFile = File("publish.properties")
1515if (publishPropertiesFile.exists()) {
1616 publishProperties.load(java.io.FileInputStream (publishPropertiesFile))
1717}
18+ group = " io.github.whathecode.kotlinx.interval"
19+ version = " 1.0.0-alpha.3"
1820nexusPublishing {
1921 repositories {
2022 sonatype {
@@ -25,3 +27,12 @@ nexusPublishing {
2527 }
2628 }
2729}
30+ val setSnapshotVersion: Task by tasks.creating {
31+ doFirst {
32+ val versionSplit = version.toString().split(" -" )
33+ val snapshotVersion = " ${versionSplit[0 ]} -SNAPSHOT"
34+ version = snapshotVersion
35+
36+ rootProject.subprojects.forEach { it.version = snapshotVersion }
37+ }
38+ }
Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ repositories {
1515 mavenCentral()
1616}
1717
18- group = " io.github.whathecode.kotlinx.interval"
19- version = " 1.0.0-alpha.3"
20-
2118
2219kotlin {
2320 jvm {
@@ -125,10 +122,3 @@ signing {
125122 sign(publishing.publications)
126123 }
127124}
128- val setSnapshotVersion by tasks.creating {
129- doFirst {
130- val versionSplit = version.toString().split(" -" )
131- val snapshotVersion = " ${versionSplit[0 ]} -SNAPSHOT"
132- version = snapshotVersion
133- }
134- }
Original file line number Diff line number Diff line change 1+ group = rootProject.group
2+ version = rootProject.version
3+
14plugins {
25 id( " interval.library-conventions" )
36}
47
58publishing {
69 publications.filterIsInstance<MavenPublication >().forEach {
710 it.pom {
8- name.set(" kotlinx. interval. datetime" )
11+ name.set(" kotlinx- interval- datetime" )
912 description.set(" Kotlin multiplatform bounded open/closed date/time intervals." )
1013 }
1114 }
@@ -15,13 +18,13 @@ kotlin {
1518 sourceSets {
1619 commonMain {
1720 dependencies {
18- api(project(" :kotlinx. interval" ))
21+ api(project(" :kotlinx- interval" ))
1922 implementation(" org.jetbrains.kotlinx:kotlinx-datetime:0.3.2" )
2023 }
2124 }
2225 commonTest {
2326 dependencies {
24- implementation(project(" :kotlinx. interval. test" ))
27+ implementation(project(" :kotlinx- interval- test" ))
2528 }
2629 }
2730 }
Original file line number Diff line number Diff line change 1+ group = rootProject.group
2+ version = rootProject.version
3+
14plugins {
25 id( " interval.library-conventions" )
36}
47
58publishing {
69 publications.filterIsInstance<MavenPublication >().forEach {
710 it.pom {
8- name.set(" kotlinx. interval. test" )
11+ name.set(" kotlinx- interval- test" )
912 description.set(" Base test classes for extensions of kotlinx.interval." )
1013 }
1114 }
@@ -15,7 +18,7 @@ kotlin {
1518 sourceSets {
1619 commonMain {
1720 dependencies {
18- api(project(" :kotlinx. interval" ))
21+ api(project(" :kotlinx- interval" ))
1922 implementation(kotlin(" test" ))
2023 }
2124 }
Original file line number Diff line number Diff line change 1+ group = rootProject.group
2+ version = rootProject.version
3+
14plugins {
25 id( " interval.library-conventions" )
36}
47
58publishing {
69 publications.filterIsInstance<MavenPublication >().forEach {
710 it.pom {
8- name.set(" kotlinx. interval" )
11+ name.set(" kotlinx- interval" )
912 description.set(" Kotlin multiplatform bounded open/closed generic intervals." )
1013 }
1114 }
@@ -15,7 +18,7 @@ kotlin {
1518 sourceSets {
1619 commonTest {
1720 dependencies {
18- implementation(project(" :kotlinx. interval. test" ))
21+ implementation(project(" :kotlinx- interval- test" ))
1922 }
2023 }
2124 }
Original file line number Diff line number Diff line change 1- rootProject.name = " kotlinx-interval"
1+ include(" kotlinx.interval" )
2+ project(" :kotlinx.interval" ).name = " kotlinx-interval"
23
3- include( " kotlinx.interval" )
4- include( " kotlinx.interval.test" )
5- include( " kotlinx.interval.datetime" )
4+ include(" kotlinx.interval.test" )
5+ project(" :kotlinx.interval.test" ).name = " kotlinx-interval-test"
6+
7+ include(" kotlinx.interval.datetime" )
8+ project(" :kotlinx.interval.datetime" ).name = " kotlinx-interval-datetime"
You can’t perform that action at this time.
0 commit comments