[K/N][build] Make build-tools to be able to build as a project

* Replace and fix project dependencies in build-tools
* Add Gradle annotations for tasks
This commit is contained in:
Pavel Punegov
2023-01-26 19:35:50 +01:00
committed by Space Team
parent dcc5c7e435
commit 45637c1b94
3 changed files with 13 additions and 14 deletions
+5 -13
View File
@@ -43,9 +43,6 @@ dependencies {
api(gradleApi())
api(kotlinStdlib())
commonApi(project(":kotlin-gradle-plugin"))
commonApi(project(":kotlin-gradle-plugin-api"))
commonApi(project(":kotlin-gradle-plugin-model"))
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:${kotlinBuildProperties.buildGradlePluginVersion}")
@@ -63,17 +60,12 @@ dependencies {
}
}
api(project(":native:kotlin-native-utils"))
api(project(":kotlin-native-shared"))
api(project(":kotlinx-metadata-klib"))
}
implementation(commonDependency("org.jetbrains.kotlinx:kotlinx-coroutines-core"))
kotlin {
sourceSets {
main {
kotlin.srcDir("$projectDir/../tools/benchmarks/shared/src/main/kotlin/report")
}
}
implementation(commonDependency("org.jetbrains.kotlin:kotlin-native-utils:$kotlinVersion"))
implementation(commonDependency("org.jetbrains.kotlinx:kotlinx-metadata-klib:$metadataVersion"))
api(project(":kotlin-native-shared"))
}
val compileKotlin: KotlinCompile by tasks
@@ -2,6 +2,8 @@ package org.jetbrains.kotlin
import org.gradle.api.Action
import org.gradle.api.Task
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
/**
* An interface that any test that works with ExecutorService
@@ -11,12 +13,14 @@ interface KonanTestExecutable : Task {
/**
* Test executable to be run by the service.
*/
@get:Input
val executable: String
/**
* Action that configures task or does some workload before the test will be executed.
* Could be done as a first step in the test or just as a `doFirst` action in the test task.
*/
@get:Input
var doBeforeRun: Action<in Task>?
/**
@@ -24,10 +28,12 @@ interface KonanTestExecutable : Task {
* Depending on the test task implementation this action is done before the build task
* or as its `doFirst` action.
*/
@get:Input
var doBeforeBuild: Action<in Task>?
/**
* Build tasks that this [executable] depends on, or is built from.
*/
@get:Internal
val buildTasks: List<Task>
}
@@ -54,12 +54,13 @@ abstract class KonanTest : DefaultTask(), KonanTestExecutable {
/**
* Test executable arguments.
*/
@Input
@get:Input
var arguments = mutableListOf<String>()
/**
* Test executable.
*/
@get:Input
abstract override val executable: String
/**