Skip to content

stub-convention plugin #1982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.util.*

plugins {
`kotlin-dsl`
}
Expand All @@ -9,3 +11,14 @@ repositories {
kotlinDslPluginOptions {
experimentalWarning.set(false)
}

val props = Properties().apply {
file("../gradle.properties").inputStream().use { load(it) }
}

fun version(target: String): String =
props.getProperty("${target}_version")

dependencies {
implementation(kotlin("gradle-plugin", version("kotlin")))
}
7 changes: 7 additions & 0 deletions buildSrc/src/main/kotlin/stdlib-stub-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

tasks.named<KotlinCompile>("compileKotlin") {
kotlinOptions {
freeCompilerArgs += "-Xallow-kotlin-package"
}
}
8 changes: 2 additions & 6 deletions js/js-stub/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

tasks.named<KotlinCompile>("compileKotlin") {
kotlinOptions {
freeCompilerArgs += "-Xallow-kotlin-package"
}
plugins {
`stdlib-stub-convention`
}
8 changes: 2 additions & 6 deletions stdlib-stubs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

tasks.named<KotlinCompile>("compileKotlin") {
kotlinOptions {
freeCompilerArgs += "-Xallow-kotlin-package"
}
plugins {
`stdlib-stub-convention`
}