forked from psxpaul/gradle-execfork-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
69 lines (58 loc) · 1.79 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
plugins {
id("com.gradle.plugin-publish").version("0.14.0")
id("org.jetbrains.kotlin.jvm").version("1.4.32")
id("idea")
id("maven-publish")
id("java-gradle-plugin")
}
group = "com.github.psxpaul"
version = File(rootDir, "VERSION").readText().trim()
dependencies {
implementation(gradleApi())
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.4.32")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.32")
testImplementation("junit:junit:4.12")
testImplementation("org.hamcrest:hamcrest-all:1.3")
}
pluginBundle {
website = "http://github.com/psxpaul"
vcsUrl = "https://github.com/psxpaul/gradle-execfork-plugin"
description = "Execute Java or shell processes in the background during a build"
tags = listOf("java", "exec", "background", "process")
(plugins) {
create("execForkPlugin") {
id = "com.github.psxpaul.execfork"
displayName = "Gradle Exec Fork Plugin"
}
}
}
tasks {
val sampleProjects by creating(GradleBuild::class) {
buildFile = File("${project.rootDir}/sample_projects/build.gradle")
tasks = listOf("clean", "build")
}
sampleProjects.dependsOn("publishToMavenLocal")
"test" { finalizedBy(sampleProjects) }
named<Test>("test") {
testLogging.exceptionFormat = TestExceptionFormat.FULL
}
}
val javadocJar by tasks.creating(Jar::class) {
archiveClassifier.set("javadoc")
from("javadoc")
}
val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
artifacts {
add("archives", javadocJar)
add("archives", sourcesJar)
}