From 44d68627cab740d09e4681b2dd27a4cbfaa9397a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Raja=20Mart=C3=ADnez?= Date: Tue, 10 Apr 2018 22:00:25 +0200 Subject: [PATCH] Fixes `@deriving` and releases 0.7.1 (#784) --- README.md | 30 ++++++++--------- gradle.properties | 2 +- .../arrow/derive/DerivingFileGenerator.kt | 4 +-- modules/core/arrow-test/build.gradle | 3 ++ modules/docs/arrow-docs/docs/docs/README.md | 32 +++++++++---------- 5 files changed, 37 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 6f1a4c8a3b7..4aec5518f5d 100644 --- a/README.md +++ b/README.md @@ -38,21 +38,21 @@ Add the dependencies into the project's `build.gradle` ```groovy dependencies { - compile 'io.arrow-kt:arrow-core:0.7.0' - compile 'io.arrow-kt:arrow-syntax:0.7.0' - compile 'io.arrow-kt:arrow-typeclasses:0.7.0' - compile 'io.arrow-kt:arrow-data:0.7.0' - compile 'io.arrow-kt:arrow-instances-core:0.7.0' - compile 'io.arrow-kt:arrow-instances-data:0.7.0' - kapt 'io.arrow-kt:arrow-annotations-processor:0.7.0' + compile 'io.arrow-kt:arrow-core:0.7.1' + compile 'io.arrow-kt:arrow-syntax:0.7.1' + compile 'io.arrow-kt:arrow-typeclasses:0.7.1' + compile 'io.arrow-kt:arrow-data:0.7.1' + compile 'io.arrow-kt:arrow-instances-core:0.7.1' + compile 'io.arrow-kt:arrow-instances-data:0.7.1' + kapt 'io.arrow-kt:arrow-annotations-processor:0.7.1' - compile 'io.arrow-kt:arrow-free:0.7.0' //optional - compile 'io.arrow-kt:arrow-mtl:0.7.0' //optional - compile 'io.arrow-kt:arrow-effects:0.7.0' //optional - compile 'io.arrow-kt:arrow-effects-rx2:0.7.0' //optional - compile 'io.arrow-kt:arrow-effects-kotlinx-coroutines:0.7.0' //optional - compile 'io.arrow-kt:arrow-optics:0.7.0' //optional - compile 'io.arrow-kt:arrow-generic:0.7.0' //optional + compile 'io.arrow-kt:arrow-free:0.7.1' //optional + compile 'io.arrow-kt:arrow-mtl:0.7.1' //optional + compile 'io.arrow-kt:arrow-effects:0.7.1' //optional + compile 'io.arrow-kt:arrow-effects-rx2:0.7.1' //optional + compile 'io.arrow-kt:arrow-effects-kotlinx-coroutines:0.7.1' //optional + compile 'io.arrow-kt:arrow-optics:0.7.1' //optional + compile 'io.arrow-kt:arrow-generic:0.7.1' //optional } ``` @@ -69,7 +69,7 @@ apply from: rootProject.file('gradle/generated-kotlin-sources.gradle') //optiona dependencies { ... - kapt 'io.arrow-kt:arrow-annotations-processor:0.7.0' //optional + kapt 'io.arrow-kt:arrow-annotations-processor:0.7.1' //optional ... } ``` diff --git a/gradle.properties b/gradle.properties index 40d6def4ef2..9a3ccfc3ef6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Package definitions GROUP=io.arrow-kt -VERSION_NAME=0.7.1-SNAPSHOT +VERSION_NAME=0.7.1 # Gradle options org.gradle.jvmargs=-Xmx4g # Kotlin configuration diff --git a/modules/core/arrow-annotations-processor/src/main/java/arrow/derive/DerivingFileGenerator.kt b/modules/core/arrow-annotations-processor/src/main/java/arrow/derive/DerivingFileGenerator.kt index dc3194c0693..4cb511896ff 100644 --- a/modules/core/arrow-annotations-processor/src/main/java/arrow/derive/DerivingFileGenerator.kt +++ b/modules/core/arrow-annotations-processor/src/main/java/arrow/derive/DerivingFileGenerator.kt @@ -40,8 +40,8 @@ data class FunctionSignature( fun generate(): String { val typeParamsS = tparams.joinToString(prefix = "<`", separator = "`, `", postfix = "`>") val argsS = args.joinToString(prefix = "(`", separator = "`, `", postfix = "`)") { "${it.first}: ${it.second}" } - val receiver = if (hkArgs is HKArgs.First) "`${hkArgs.receiver}`" else "" - return """|override fun $typeParamsS $receiver.`$name`$argsS: $retType = + val receiver = if (hkArgs is HKArgs.First) "`${hkArgs.receiver}.`" else "" + return """|override fun $typeParamsS $receiver`$name`$argsS: $retType = | ${implBody()}""".removeBackticks().trimMargin() } diff --git a/modules/core/arrow-test/build.gradle b/modules/core/arrow-test/build.gradle index 87fc23d98ff..8dac7fdd7d1 100644 --- a/modules/core/arrow-test/build.gradle +++ b/modules/core/arrow-test/build.gradle @@ -8,6 +8,9 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion" compile "io.kotlintest:kotlintest:$kotlinTestVersion" + kapt project(':arrow-annotations-processor') } apply from: rootProject.file('gradle/gradle-mvn-push.gradle') +apply from: rootProject.file('gradle/generated-kotlin-sources.gradle') +apply plugin: 'kotlin-kapt' diff --git a/modules/docs/arrow-docs/docs/docs/README.md b/modules/docs/arrow-docs/docs/docs/README.md index dea3967ee3b..2cac1a0e4b5 100644 --- a/modules/docs/arrow-docs/docs/docs/README.md +++ b/modules/docs/arrow-docs/docs/docs/README.md @@ -44,21 +44,21 @@ Add the dependencies into the project's `build.gradle` ```groovy dependencies { - compile 'io.arrow-kt:arrow-core:0.7.0' - compile 'io.arrow-kt:arrow-syntax:0.7.0' - compile 'io.arrow-kt:arrow-typeclasses:0.7.0' - compile 'io.arrow-kt:arrow-data:0.7.0' - compile 'io.arrow-kt:arrow-instances-core:0.7.0' - compile 'io.arrow-kt:arrow-instances-data:0.7.0' - kapt 'io.arrow-kt:arrow-annotations-processor:0.7.0' - - compile 'io.arrow-kt:arrow-free:0.7.0' //optional - compile 'io.arrow-kt:arrow-mtl:0.7.0' //optional - compile 'io.arrow-kt:arrow-effects:0.7.0' //optional - compile 'io.arrow-kt:arrow-effects-rx2:0.7.0' //optional - compile 'io.arrow-kt:arrow-effects-kotlinx-coroutines:0.7.0' //optional - compile 'io.arrow-kt:arrow-optics:0.7.0' //optional - compile 'io.arrow-kt:arrow-generic:0.7.0' //optional + compile 'io.arrow-kt:arrow-core:0.7.1' + compile 'io.arrow-kt:arrow-syntax:0.7.1' + compile 'io.arrow-kt:arrow-typeclasses:0.7.1' + compile 'io.arrow-kt:arrow-data:0.7.1' + compile 'io.arrow-kt:arrow-instances-core:0.7.1' + compile 'io.arrow-kt:arrow-instances-data:0.7.1' + kapt 'io.arrow-kt:arrow-annotations-processor:0.7.1' + + compile 'io.arrow-kt:arrow-free:0.7.1' //optional + compile 'io.arrow-kt:arrow-mtl:0.7.1' //optional + compile 'io.arrow-kt:arrow-effects:0.7.1' //optional + compile 'io.arrow-kt:arrow-effects-rx2:0.7.1' //optional + compile 'io.arrow-kt:arrow-effects-kotlinx-coroutines:0.7.1' //optional + compile 'io.arrow-kt:arrow-optics:0.7.1' //optional + compile 'io.arrow-kt:arrow-generic:0.7.1' //optional } ``` @@ -75,7 +75,7 @@ apply from: rootProject.file('gradle/generated-kotlin-sources.gradle') //optiona dependencies { ... - kapt 'io.arrow-kt:arrow-annotations-processor:0.7.0' //optional + kapt 'io.arrow-kt:arrow-annotations-processor:0.7.1' //optional ... } ```