This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
68 lines (56 loc) · 1.93 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun properties(key: String) = project.findProperty(key)?.toString()
plugins {
`kotlin-dsl`
`maven-publish`
kotlin("jvm") version "1.6.10"
id("com.gradle.plugin-publish") version "0.19.0"
}
group = "org.jetbrains.qodana"
version = "0.1." + properties("buildNumber")
repositories {
mavenCentral()
}
dependencies {
testImplementation(gradleTestKit())
testImplementation(kotlin("test"))
testImplementation(kotlin("test-junit"))
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
test {
configureTests(this)
}
wrapper {
gradleVersion = properties("gradleVersion")
distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
}
fun configureTests(testTask: Test) {
val testGradleHomePath = "$buildDir/testGradleHome"
testTask.doFirst {
File(testGradleHomePath).mkdir()
}
testTask.systemProperties["test.gradle.home"] = testGradleHomePath
testTask.systemProperties["test.gradle.default"] = properties("gradleVersion")
testTask.systemProperties["test.gradle.version"] = properties("testGradleVersion")
testTask.systemProperties["test.gradle.arguments"] = properties("testGradleArguments")
testTask.outputs.dir(testGradleHomePath)
}
gradlePlugin {
plugins.create("qodana") {
id = "org.jetbrains.qodana"
displayName = "Gradle Qodana Plugin"
implementationClass = "org.jetbrains.qodana.QodanaPlugin"
}
}
pluginBundle {
website = "https://github.com/JetBrains/gradle-qodana-plugin"
vcsUrl = "https://github.com/JetBrains/gradle-qodana-plugin"
description = "Gradle Qodana Plugin allows to run and configure Idea inspections for Gradle project."
tags = listOf("qodana", "intellij", "idea", "inspections")
}