-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate play-services and example-frontend-js to Gradle kts (#2543)
* Kotlin DSL - rename "example-frontend-js" build script * Kotlin DSL - 'example-frontend-js' * Kotlin DSL - rename "play-services" build script * Kotlin DSL - 'play-services' Co-authored-by: Victor Turansky <victor.turansky@gmail.com>
- Loading branch information
Showing
4 changed files
with
68 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
integration/kotlinx-coroutines-play-services/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/" | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")) | ||
} |