MPP plugin: add expectedBy deps to "api" configuration
Currently, KotlinPlatformJvmPlugin and KotlinPlatformJsPlugin are adding expectedBy deps to "compile" configuration which is deprecated by Gradle. This PR fixes that by replacing "compile" with "api" which is what we are doing in KotlinPlatformAndroidPlugin. This PR also makes integration tests running with warning-mode=fail by default and fixes most of the integration tests. For the remaining tests to be fixed, we make them run with warning-mode=summary and will fix them incrementally in following PRs.
This commit is contained in:
+18
-1
@@ -153,6 +153,20 @@ abstract class BaseGradleIT {
|
||||
return wrapper
|
||||
}
|
||||
|
||||
fun mightUpdateSettingsScript(wrapperVersion: String, settingsScript: File) {
|
||||
// enableFeaturePreview("GRADLE_METADATA") is no longer needed when building with Gradle 5.4 or above
|
||||
if (GradleVersion.version(wrapperVersion) > GradleVersion.version("5.3")) {
|
||||
settingsScript.apply {
|
||||
if(exists()) {
|
||||
modify {
|
||||
it.replace("enableFeaturePreview('GRADLE_METADATA')", "//")
|
||||
it.replace("enableFeaturePreview(\"GRADLE_METADATA\")", "//")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun createNewWrapperDir(version: String): File =
|
||||
createTempDir("GradleWrapper-$version-")
|
||||
.apply {
|
||||
@@ -215,7 +229,7 @@ abstract class BaseGradleIT {
|
||||
val jsCompilerType: KotlinJsCompilerType? = null,
|
||||
val configurationCache: Boolean = false,
|
||||
val configurationCacheProblems: ConfigurationCacheProblems = ConfigurationCacheProblems.FAIL,
|
||||
val warningMode: WarningMode = WarningMode.Summary
|
||||
val warningMode: WarningMode = WarningMode.Fail
|
||||
)
|
||||
|
||||
enum class ConfigurationCacheProblems {
|
||||
@@ -321,6 +335,9 @@ abstract class BaseGradleIT {
|
||||
|
||||
val env = createEnvironmentVariablesMap(options)
|
||||
val wrapperDir = prepareWrapper(wrapperVersion, env)
|
||||
|
||||
mightUpdateSettingsScript(wrapperVersion, gradleSettingsScript())
|
||||
|
||||
val cmd = createBuildCommand(wrapperDir, params, options)
|
||||
|
||||
println("<=== Test build: ${this.projectName} $cmd ===>")
|
||||
|
||||
+13
-7
@@ -37,7 +37,6 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
override fun defaultBuildOptions(): BuildOptions =
|
||||
super.defaultBuildOptions().copy(
|
||||
withBuildCache = true,
|
||||
androidGradlePluginVersion = AGPVersion.v3_6_0,
|
||||
androidHome = KotlinTestUtils.findAndroidSdk()
|
||||
)
|
||||
|
||||
@@ -65,7 +64,10 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
lateinit var firstOutputHashes: List<Pair<File, Int>>
|
||||
|
||||
workingDir = workingDirs[0]
|
||||
firstProject.build(*testCase.taskToExecute) {
|
||||
firstProject.build(
|
||||
*testCase.taskToExecute,
|
||||
options = defaultBuildOptions().copy(androidGradlePluginVersion = testCase.androidGradlePluginVersion)
|
||||
) {
|
||||
assertSuccessful()
|
||||
firstOutputHashes = hashOutputFiles(outputRoots)
|
||||
cacheableTaskNames.forEach { assertTaskPackedToCache(":$it") }
|
||||
@@ -74,9 +76,10 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
workingDir = workingDirs[1]
|
||||
val alternateBuildEnvOptions = if (withAnotherGradleHome) {
|
||||
val alternateGradleHome = File(firstProject.projectDir.parentFile, "gradleUserHome")
|
||||
defaultBuildOptions().copy(gradleUserHome = alternateGradleHome)
|
||||
defaultBuildOptions().copy(
|
||||
gradleUserHome = alternateGradleHome, androidGradlePluginVersion = testCase.androidGradlePluginVersion)
|
||||
} else {
|
||||
defaultBuildOptions()
|
||||
defaultBuildOptions().copy(androidGradlePluginVersion = testCase.androidGradlePluginVersion)
|
||||
}
|
||||
secondProject.build(*testCase.taskToExecute, options = alternateBuildEnvOptions) {
|
||||
assertSuccessful()
|
||||
@@ -98,7 +101,8 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
val initProject: Project.() -> Unit = {},
|
||||
val taskToExecute: Array<String>,
|
||||
val withAnotherGradleHome: Boolean = false,
|
||||
val gradleVersionRequired: GradleVersionRequired = DEFAULT_GRADLE_VERSION
|
||||
val gradleVersionRequired: GradleVersionRequired = DEFAULT_GRADLE_VERSION,
|
||||
val androidGradlePluginVersion: AGPVersion? = null
|
||||
) {
|
||||
|
||||
override fun toString(): String = (projectDirectoryPrefix?.plus("/") ?: "") + projectName
|
||||
@@ -157,7 +161,8 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
},
|
||||
outputRootPaths = listOf("Lib", "Android", "Test").map { "$it/build" }
|
||||
outputRootPaths = listOf("Lib", "Android", "Test").map { "$it/build" },
|
||||
androidGradlePluginVersion = AGPVersion.v3_6_0
|
||||
),
|
||||
TestCase("android-dagger",
|
||||
taskToExecute = arrayOf("assembleDebug"),
|
||||
@@ -168,7 +173,8 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
}
|
||||
},
|
||||
outputRootPaths = listOf("app/build"),
|
||||
initProject = { File(projectDir, "app/build.gradle").appendText("\nkapt.useBuildCache = true") }
|
||||
initProject = { File(projectDir, "app/build.gradle").appendText("\nkapt.useBuildCache = true") },
|
||||
androidGradlePluginVersion = AGPVersion.v3_6_0
|
||||
),
|
||||
TestCase("native-build-cache",
|
||||
taskToExecute = arrayOf("build-cache-lib:publish", "build-cache-app:assemble"),
|
||||
|
||||
+3
-1
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.jetbrains.kotlin.gradle.util.AGPVersion
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.Test
|
||||
@@ -18,7 +19,8 @@ class ConfigurationCacheForAndroidIT : AbstractConfigurationCacheIT() {
|
||||
androidHome = KotlinTestUtils.findAndroidSdk(),
|
||||
androidGradlePluginVersion = androidGradlePluginVersion,
|
||||
configurationCache = true,
|
||||
configurationCacheProblems = ConfigurationCacheProblems.FAIL
|
||||
configurationCacheProblems = ConfigurationCacheProblems.FAIL,
|
||||
warningMode = WarningMode.Summary
|
||||
)
|
||||
|
||||
@Test
|
||||
|
||||
+11
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.gradle
|
||||
|
||||
import com.google.gson.Gson
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.KLIB_TYPE
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.*
|
||||
@@ -22,6 +23,11 @@ import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class Kotlin2JsIrGradlePluginIT : AbstractKotlin2JsGradlePluginIT(true) {
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions {
|
||||
return super.defaultBuildOptions().copy(warningMode = WarningMode.Summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun generateDts() {
|
||||
val project = Project("kotlin2JsIrDtsGeneration")
|
||||
@@ -116,6 +122,11 @@ class Kotlin2JsIrGradlePluginIT : AbstractKotlin2JsGradlePluginIT(true) {
|
||||
}
|
||||
|
||||
class Kotlin2JsGradlePluginIT : AbstractKotlin2JsGradlePluginIT(false) {
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions {
|
||||
return super.defaultBuildOptions().copy(warningMode = WarningMode.Summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKotlinJsBuiltins() {
|
||||
val project = Project("kotlinBuiltins")
|
||||
|
||||
+8
-3
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.jetbrains.kotlin.gradle.plugin.MULTIPLE_KOTLIN_PLUGINS_LOADED_WARNING
|
||||
import org.jetbrains.kotlin.gradle.plugin.MULTIPLE_KOTLIN_PLUGINS_SPECIFIC_PROJECTS_WARNING
|
||||
import org.jetbrains.kotlin.gradle.scripting.internal.ScriptingGradleSubplugin
|
||||
@@ -35,6 +36,10 @@ import kotlin.test.assertTrue
|
||||
|
||||
class KotlinGradleIT : BaseGradleIT() {
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions {
|
||||
return super.defaultBuildOptions().copy(warningMode = WarningMode.Summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCrossCompile() {
|
||||
val project = Project("kotlinJavaProject")
|
||||
@@ -774,12 +779,12 @@ class KotlinGradleIT : BaseGradleIT() {
|
||||
with(Project("simpleProject")) {
|
||||
setupWorkingDir()
|
||||
// Add a dependency with an explicit lower Kotlin version that has a kotlin-stdlib transitive dependency:
|
||||
gradleBuildScript().appendText("\ndependencies { compile 'org.jetbrains.kotlin:kotlin-reflect:1.2.71' }")
|
||||
gradleBuildScript().appendText("\ndependencies { implementation 'org.jetbrains.kotlin:kotlin-reflect:1.2.71' }")
|
||||
testResolveAllConfigurations {
|
||||
assertSuccessful()
|
||||
assertContains(">> :compile --> kotlin-reflect-1.2.71.jar")
|
||||
assertContains(">> :compileClasspath --> kotlin-reflect-1.2.71.jar")
|
||||
// Check that the default newer Kotlin version still wins for 'kotlin-stdlib':
|
||||
assertContains(">> :compile --> kotlin-stdlib-${defaultBuildOptions().kotlinVersion}.jar")
|
||||
assertContains(">> :compileClasspath --> kotlin-stdlib-${defaultBuildOptions().kotlinVersion}.jar")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
||||
${'\n'}
|
||||
task printCompileConfiguration(type: DefaultTask) {
|
||||
doFirst {
|
||||
configurations.compile.resolvedConfiguration.resolvedArtifacts.each {
|
||||
configurations.getByName("api").dependencies.each {
|
||||
println("Dependency: '" + it.name + "'")
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -6,6 +6,7 @@ package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.jetbrains.kotlin.gradle.native.GeneralNativeIT.Companion.checkNativeCommandLineArguments
|
||||
import org.jetbrains.kotlin.gradle.native.GeneralNativeIT.Companion.containsSequentially
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.jetbrains.kotlin.gradle.native.MPPNativeTargets
|
||||
import org.jetbrains.kotlin.gradle.native.configureMemoryInGradleProperties
|
||||
import org.jetbrains.kotlin.gradle.native.transformNativeTestProject
|
||||
@@ -43,6 +44,10 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
private fun Project.targetClassesDir(targetName: String, sourceSetName: String = "main") =
|
||||
classesDir(sourceSet = "$targetName/$sourceSetName")
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions {
|
||||
return super.defaultBuildOptions().copy(warningMode = WarningMode.Summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testLibAndApp() = doTestLibAndApp(
|
||||
"sample-lib",
|
||||
|
||||
+5
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.util.*
|
||||
import org.junit.Test
|
||||
@@ -13,6 +14,10 @@ import kotlin.test.assertTrue
|
||||
class VariantAwareDependenciesIT : BaseGradleIT() {
|
||||
private val gradleVersion = GradleVersionRequired.FOR_MPP_SUPPORT
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions {
|
||||
return super.defaultBuildOptions().copy(warningMode = WarningMode.Summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testJvmKtAppResolvesMppLib() {
|
||||
val outerProject = Project("sample-lib", gradleVersion, "new-mpp-lib-and-app")
|
||||
|
||||
+5
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.gradle.native
|
||||
|
||||
import com.intellij.testFramework.TestDataFile
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.jdom.input.SAXBuilder
|
||||
import org.jetbrains.kotlin.gradle.BaseGradleIT
|
||||
import org.jetbrains.kotlin.gradle.GradleVersionRequired
|
||||
@@ -93,6 +94,10 @@ class GeneralNativeIT : BaseGradleIT() {
|
||||
override val defaultGradleVersion: GradleVersionRequired
|
||||
get() = GradleVersionRequired.FOR_MPP_SUPPORT
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions {
|
||||
return super.defaultBuildOptions().copy(warningMode = WarningMode.Summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testParallelExecutionSmoke(): Unit = with(transformNativeTestProjectWithPluginDsl("native-parallel")) {
|
||||
// Check that the K/N compiler can be started in-process in parallel.
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:12.0'
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+1
-1
@@ -17,5 +17,5 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
+3
-3
@@ -16,9 +16,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:12.0'
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileJava {
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin.compilerJarFile = project.file("compiler.jar")
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
compile project(':lib-project')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation project(':lib-project')
|
||||
}
|
||||
|
||||
+3
-3
@@ -16,8 +16,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
|
||||
}
|
||||
|
||||
task jarSources(type: Jar) {
|
||||
@@ -25,7 +25,7 @@ task jarSources(type: Jar) {
|
||||
classifier = 'source'
|
||||
}
|
||||
artifacts {
|
||||
compile jarSources
|
||||
implementation jarSources
|
||||
}
|
||||
|
||||
compileKotlin2Js.kotlinOptions.outputFile = "${buildDir}/kotlin2js/main/module.js"
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+2
-2
@@ -2,6 +2,6 @@ apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
compile project(':libB')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation project(':libB')
|
||||
}
|
||||
+1
-1
@@ -17,7 +17,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin.javaPackagePrefix = "my.pack.name"
|
||||
+1
-1
@@ -24,7 +24,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@ apply plugin: "kotlin"
|
||||
apply plugin: "kotlin-kapt"
|
||||
|
||||
dependencies {
|
||||
compile project(":lib")
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation project(":lib")
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
compile "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
kapt "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
|
||||
// actually unused, but kapt skips AP when annotation processing classpath is empty (see checkOptions)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
apply plugin: "kotlin"
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
+3
-3
@@ -18,10 +18,10 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
compile "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
kapt "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
compileKotlin.kotlinOptions.allWarningsAsErrors = true
|
||||
+1
-1
@@ -16,7 +16,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin2Js.kotlinOptions.outputFile = "${buildDir}/examplelib.js"
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(":libraryProject")
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
compile "org.mozilla:rhino:1.7.7.1"
|
||||
implementation project(":libraryProject")
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
implementation "org.mozilla:rhino:1.7.7.1"
|
||||
}
|
||||
|
||||
compileKotlin2Js.kotlinOptions.sourceMap = true
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||
}
|
||||
|
||||
if (project.findProperty("kotlin.js.useIrBackend")?.toBoolean() == true) {
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
+3
-3
@@ -21,9 +21,9 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:12.0'
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+5
-5
@@ -21,11 +21,11 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:12.0'
|
||||
deployCompile 'com.google.guava:guava:12.0'
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
deployCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
deployImplementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
deployImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:12.0'
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ repositories {
|
||||
apply plugin: 'java'
|
||||
|
||||
dependencies {
|
||||
runtime "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
runtimeOnly "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
+1
-1
@@ -6,5 +6,5 @@ group = "com.example.jvm"
|
||||
version = "1.0"
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,5 +16,5 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
dependencies {
|
||||
compile project(':lib')
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation project(':lib')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,6 +2,6 @@ apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
dependencies {
|
||||
expectedBy project(":lib")
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
compile 'com.google.guava:guava:20.0'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.google.guava:guava:20.0'
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
apply plugin: "kotlin"
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:12.0'
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
apply plugin: "kotlin"
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
apply plugin: "kotlin"
|
||||
|
||||
dependencies {
|
||||
compile project(':projA')
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation project(':projA')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
apply plugin: 'kotlin-platform-common'
|
||||
|
||||
dependencies {
|
||||
compile 'com.example:sample-lib:1.0'
|
||||
implementation 'com.example:sample-lib:1.0'
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
apply plugin: 'kotlin2js'
|
||||
|
||||
dependencies {
|
||||
compile 'com.example:sample-lib:1.0'
|
||||
implementation 'com.example:sample-lib:1.0'
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@ apply plugin: 'kotlin'
|
||||
apply plugin: 'application'
|
||||
|
||||
dependencies {
|
||||
compile 'com.example:sample-lib:1.0'
|
||||
implementation 'com.example:sample-lib:1.0'
|
||||
}
|
||||
|
||||
mainClassName = 'com.example.app.JvmAppKt'
|
||||
+2
-2
@@ -13,6 +13,6 @@ allOpen {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
testCompile "junit:junit:4.12"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
testImplementation "junit:junit:4.12"
|
||||
}
|
||||
+5
-5
@@ -21,11 +21,11 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:12.0'
|
||||
deployCompile 'com.google.guava:guava:12.0'
|
||||
testCompile 'org.testng:testng:6.8'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
deployCompile "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
deployImplementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
deployImplementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+1
-1
@@ -16,5 +16,5 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
+1
-5
@@ -56,7 +56,7 @@ open class KotlinPlatformImplementationPluginBase(platformName: String) : Kotlin
|
||||
private val commonProjects = arrayListOf<Project>()
|
||||
|
||||
protected open fun configurationsForCommonModuleDependency(project: Project): List<Configuration> =
|
||||
listOf(project.configurations.getByName("compile"))
|
||||
listOf(project.configurations.getByName("api"))
|
||||
|
||||
override fun apply(project: Project) {
|
||||
warnAboutKotlin12xMppDeprecation(project)
|
||||
@@ -239,10 +239,6 @@ open class KotlinPlatformAndroidPlugin : KotlinPlatformImplementationPluginBase(
|
||||
super.apply(project)
|
||||
}
|
||||
|
||||
override fun configurationsForCommonModuleDependency(project: Project): List<Configuration> =
|
||||
(project.configurations.findByName("api"))?.let(::listOf)
|
||||
?: super.configurationsForCommonModuleDependency(project) // older Android plugins don't have api/implementation configs
|
||||
|
||||
override fun namedSourceSetsContainer(project: Project): NamedDomainObjectContainer<*> =
|
||||
(project.extensions.getByName("android") as BaseExtension).sourceSets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user