diff options
author | Leonid Startsev <sandwwraith@gmail.com> | 2019-04-15 18:22:18 +0300 |
---|---|---|
committer | Leonid Startsev <sandwwraith@gmail.com> | 2019-04-15 18:22:18 +0300 |
commit | 0e19a27e949f200ed96292e544317edf068e2957 (patch) | |
tree | 16f289f53c6f56e042c35031dc5ebe52ef5e45fe /integration-test | |
parent | 26d8bbb7fc1a7cb0c3a9b89ec7b84d143e18a2bb (diff) | |
download | kotlinx.serialization-0e19a27e949f200ed96292e544317edf068e2957.tar.gz |
Add Dagger to dependencies to test integration with Kapt.
Allow using UnstableDefault in tests.
Diffstat (limited to 'integration-test')
-rw-r--r-- | integration-test/build.gradle | 13 | ||||
-rw-r--r-- | integration-test/settings.gradle | 4 | ||||
-rw-r--r-- | integration-test/src/commonTest/kotlin/sample/JsonTest.kt | 1 |
3 files changed, 17 insertions, 1 deletions
diff --git a/integration-test/build.gradle b/integration-test/build.gradle index 196104c1..8209baf6 100644 --- a/integration-test/build.gradle +++ b/integration-test/build.gradle @@ -15,6 +15,7 @@ buildscript { plugins { id 'kotlin-multiplatform' id 'kotlinx-serialization' + id 'org.jetbrains.kotlin.kapt' } repositories { @@ -31,9 +32,9 @@ version '0.0.1' apply plugin: 'maven-publish' kotlin { - jvm() // Switching module kind for JS is required to run tests targets { + fromPreset(presets.jvmWithJava, 'jvm') fromPreset(presets.js, 'js') { configure([compilations.main, compilations.test]) { tasks.getByName(compileKotlinTaskName).kotlinOptions { @@ -66,6 +67,7 @@ kotlin { dependencies { implementation kotlin('stdlib-jdk8') implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version" + implementation 'com.google.dagger:dagger:2.13' } } jvmTest { @@ -93,6 +95,15 @@ kotlin { macosTest { } } + sourceSets.all { + languageSettings { + useExperimentalAnnotation('kotlin.Experimental') // annotation FQ-name + } + } +} + +dependencies { + kapt 'com.google.dagger:dagger-compiler:2.13' } apply from: rootProject.file('gradle/node-js.gradle') diff --git a/integration-test/settings.gradle b/integration-test/settings.gradle index 47db7f43..ab162487 100644 --- a/integration-test/settings.gradle +++ b/integration-test/settings.gradle @@ -4,6 +4,9 @@ pluginManagement { if (requested.id.id == "kotlin-multiplatform") { useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:$mainKotlinVersion") } + if (requested.id.id == "org.jetbrains.kotlin.kapt") { + useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:$mainKotlinVersion") + } if (requested.id.id == "kotlinx-serialization") { useModule("org.jetbrains.kotlin:kotlin-serialization:$mainKotlinVersion") } @@ -11,6 +14,7 @@ pluginManagement { } repositories { + mavenLocal() mavenCentral() jcenter() maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' } diff --git a/integration-test/src/commonTest/kotlin/sample/JsonTest.kt b/integration-test/src/commonTest/kotlin/sample/JsonTest.kt index 00d3df50..919d6f32 100644 --- a/integration-test/src/commonTest/kotlin/sample/JsonTest.kt +++ b/integration-test/src/commonTest/kotlin/sample/JsonTest.kt @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@file:UseExperimental(UnstableDefault::class) package sample |