-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
78 lines (62 loc) · 1.99 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
69
70
71
72
73
74
75
76
77
78
plugins {
id("com.gradle.plugin-publish") version "0.13.0"
`java-gradle-plugin`
id("org.jetbrains.kotlin.jvm") version "1.3.71"
id("maven-publish")
}
defaultTasks(":publishToMavenLocal")
group = "com.szokone"
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}
repositories {
jcenter()
}
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library.
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
// Use the Kotlin test library.
testImplementation("org.jetbrains.kotlin:kotlin-test")
// Use the Kotlin JUnit integration.
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
}
gradlePlugin {
plugins {
create("aet") {
id = "com.szokone.aet.gradle"
implementationClass = "com.wttech.aet.gradle.AetPlugin"
}
}
}
pluginBundle {
website = "https://github.com/szymon-owczarzak"
vcsUrl = "https://github.com/szymon-owczarzak/gradle-aet-plugin"
description = "Provides DSL for generating AET suites."
(plugins) {
"aet" {
displayName = "Gradle AET Plugin"
tags = listOf("aet", "kotlin")
version = project.version.toString()
}
}
}
// Add a source set for the functional test suite
val functionalTestSourceSet = sourceSets.create("functionalTest") {
}
gradlePlugin.testSourceSets(functionalTestSourceSet)
configurations.getByName("functionalTestImplementation").extendsFrom(configurations.getByName("testImplementation"))
// Add a task to run the functional tests
val functionalTest by tasks.creating(Test::class) {
testClassesDirs = functionalTestSourceSet.output.classesDirs
classpath = functionalTestSourceSet.runtimeClasspath
}
val check by tasks.getting(Task::class) {
// Run the functional tests as part of `check`
dependsOn(functionalTest)
}