diff --git a/integration/kotlinx-coroutines-play-services/build.gradle b/integration/kotlinx-coroutines-play-services/build.gradle deleted file mode 100644 index beb11b2c06..0000000000 --- a/integration/kotlinx-coroutines-play-services/build.gradle +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -ext.tasks_version = '16.0.1' - -def artifactType = Attribute.of("artifactType", String) -def unpackedAar = Attribute.of("unpackedAar", Boolean) - -configurations.all { - afterEvaluate { - if (canBeResolved) { - attributes.attribute(unpackedAar, true) // request all AARs to be unpacked - } - } -} - -dependencies { - attributesSchema { - attribute(unpackedAar) - } - - artifactTypes { - aar { - attributes.attribute(unpackedAar, false) - } - } - - registerTransform(UnpackAar) { - from.attribute(unpackedAar, false).attribute(artifactType, "aar") - to.attribute(unpackedAar, true).attribute(artifactType, "jar") - } - - api("com.google.android.gms:play-services-tasks:$tasks_version") { - exclude group: 'com.android.support' - } -} - -tasks.withType(dokka.getClass()) { - externalDocumentationLink { - url = new URL("https://developers.google.com/android/reference/") - // This is workaround for missing package list in Google API - packageListUrl = projectDir.toPath().resolve("package.list").toUri().toURL() - } -} diff --git a/integration/kotlinx-coroutines-play-services/build.gradle.kts b/integration/kotlinx-coroutines-play-services/build.gradle.kts new file mode 100644 index 0000000000..59f3b0bd5a --- /dev/null +++ b/integration/kotlinx-coroutines-play-services/build.gradle.kts @@ -0,0 +1,41 @@ +/* + * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +val tasksVersion = "16.0.1" + +val artifactType = Attribute.of("artifactType", String::class.java) +val unpackedAar = Attribute.of("unpackedAar", Boolean::class.javaObjectType) + +configurations.configureEach { + afterEvaluate { + if (isCanBeResolved) { + attributes.attribute(unpackedAar, true) // request all AARs to be unpacked + } + } +} + +dependencies { + attributesSchema { + attribute(unpackedAar) + } + + artifactTypes { + create("aar") { + attributes.attribute(unpackedAar, false) + } + } + + registerTransform(UnpackAar::class.java) { + from.attribute(unpackedAar, false).attribute(artifactType, "aar") + to.attribute(unpackedAar, true).attribute(artifactType, "jar") + } + + api("com.google.android.gms:play-services-tasks:$tasksVersion") { + exclude(group="com.android.support") + } +} + +externalDocumentationLink( + url = "https://developers.google.com/android/reference/" +) diff --git a/js/example-frontend-js/build.gradle b/js/example-frontend-js/build.gradle deleted file mode 100644 index 213674e10b..0000000000 --- a/js/example-frontend-js/build.gradle +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -project.kotlin { - js(LEGACY) { - binaries.executable() - browser { - distribution { - directory = new File(directory.parentFile, "dist") - } - webpackTask { - cssSupport.enabled = true - } - runTask { - cssSupport.enabled = true - } - testTask { - useKarma { - useChromeHeadless() - webpackConfig.cssSupport.enabled = true - } - } - } - } - - sourceSets { - main.dependencies { - implementation "org.jetbrains.kotlinx:kotlinx-html-js:$html_version" - implementation(npm("html-webpack-plugin", "3.2.0")) - } - } -} diff --git a/js/example-frontend-js/build.gradle.kts b/js/example-frontend-js/build.gradle.kts new file mode 100644 index 0000000000..5b18966fcd --- /dev/null +++ b/js/example-frontend-js/build.gradle.kts @@ -0,0 +1,27 @@ +/* + * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +kotlin { + js(LEGACY) { + binaries.executable() + browser { + distribution { + directory = directory.parentFile.resolve("dist") + } + commonWebpackConfig { + cssSupport.enabled = true + } + testTask { + useKarma { + useChromeHeadless() + } + } + } + } +} + +dependencies { + implementation("org.jetbrains.kotlinx:kotlinx-html-js:${version("html")}") + implementation(devNpm("html-webpack-plugin", "3.2.0")) +}