diff --git a/build.gradle.kts b/build.gradle.kts index 99b1967..bfb4a92 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,11 +7,18 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile description = "A Result monad for modelling success or failure operations." +val SourceSet.kotlin: SourceDirectorySet + get() = withConvention(KotlinSourceSet::class) { kotlin } + +fun BintrayExtension.pkg(configure: BintrayExtension.PackageConfig.() -> Unit) { + pkg(delegateClosureOf(configure)) +} + plugins { `maven-publish` kotlin("jvm") version ("1.3.50") id("org.jetbrains.dokka") version ("0.9.18") - id("com.github.ben-manes.versions") version ("0.22.0") + id("com.github.ben-manes.versions") version ("0.25.0") id("com.jfrog.bintray") version ("1.8.4") id("net.researchgate.release") version ("2.8.1") } @@ -39,25 +46,10 @@ dependencies { testImplementation(kotlin("test")) } -val SourceSet.kotlin: SourceDirectorySet - get() = withConvention(KotlinSourceSet::class) { kotlin } - -fun BintrayExtension.pkg(configure: BintrayExtension.PackageConfig.() -> Unit) { - pkg(delegateClosureOf(configure)) -} - -tasks.named("dependencyUpdates") { - resolutionStrategy { - componentSelection { - all { - val rejected = listOf("alpha", "beta", "rc", "cr", "m", "eap").any { - candidate.version.contains(it, ignoreCase = true) - } - - if (rejected) { - reject("Release candidate") - } - } +tasks.withType { + rejectVersionIf { + listOf("alpha", "beta", "rc", "cr", "m", "eap", "pr").any { + candidate.version.contains(it, ignoreCase = true) } } } diff --git a/example/build.gradle.kts b/example/build.gradle.kts index 446563e..7d6bae3 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -13,7 +13,7 @@ repositories { } dependencies { - val ktorVersion = "1.2.3" + val ktorVersion = "1.2.4" implementation(rootProject) implementation(kotlin("stdlib-jdk8")) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8d58bda..ca9d628 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 8e25e6c..83f2acf 100755 --- a/gradlew +++ b/gradlew @@ -125,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"`