Move KotlinAndroidDependsOnEdgesTest.kt to new functionalTest source set
This commit is contained in:
committed by
Sebastian Sellmair
parent
1173c4380a
commit
f9b8bc0edb
@@ -10,6 +10,9 @@ plugins {
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
apply(from = "functionalTest.gradle.kts")
|
||||
val functionalTestImplementation by configurations
|
||||
|
||||
configure<GradlePluginDevelopmentExtension> {
|
||||
isAutomatedPublishing = false
|
||||
}
|
||||
@@ -79,7 +82,9 @@ dependencies {
|
||||
compileOnly("com.android.tools.build:gradle:3.0.0") { isTransitive = false }
|
||||
compileOnly("com.android.tools.build:gradle-core:3.0.0") { isTransitive = false }
|
||||
compileOnly("com.android.tools.build:builder-model:3.0.0") { isTransitive = false }
|
||||
testImplementation("com.android.tools.build:gradle:4.0.1")
|
||||
functionalTestImplementation("com.android.tools.build:gradle:4.0.1") {
|
||||
because("Functional tests are using APIs from Android. Latest Version is used to avoid NoClassDefFoundError")
|
||||
}
|
||||
|
||||
testCompile(intellijDep()) { includeJars("junit", "serviceMessages", rootProject = rootProject) }
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
||||
|
||||
project.extensions.getByType<KotlinJvmProjectExtension>().target.compilations {
|
||||
val main by getting
|
||||
create("functionalTest") {
|
||||
associateWith(main)
|
||||
val functionalTest by tasks.register<Test>("functionalTest") {
|
||||
group = JavaBasePlugin.VERIFICATION_GROUP
|
||||
description = "Runs functional tests"
|
||||
testClassesDirs = output.classesDirs
|
||||
classpath = sourceSets["functionalTest"].runtimeClasspath
|
||||
}
|
||||
tasks.named("check") {
|
||||
dependsOn(functionalTest)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations.getByName("functionalTestImplementation") {
|
||||
extendsFrom(configurations.getByName("implementation"))
|
||||
extendsFrom(configurations.getByName("testImplementation"))
|
||||
}
|
||||
|
||||
configurations.getByName("functionalTestRuntimeOnly") {
|
||||
extendsFrom(configurations.getByName("runtimeOnly"))
|
||||
extendsFrom(configurations.getByName("testRuntimeOnly"))
|
||||
}
|
||||
+3
-2
@@ -2,8 +2,9 @@
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.gradle.targets.android
|
||||
// TODO KT-34102
|
||||
@file:Suppress("invisible_reference", "invisible_member")
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import com.android.build.gradle.LibraryExtension
|
||||
import org.gradle.api.internal.project.ProjectInternal
|
||||
Reference in New Issue
Block a user