-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle.kts
122 lines (107 loc) · 3.44 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
plugins {
`java-gradle-plugin`
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("com.gradle.plugin-publish") version "0.+"
}
group = "com.jfrog"
repositories {
mavenCentral()
}
tasks.compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
val functionalTest by sourceSets.creating
dependencies {
testImplementation("commons-io:commons-io:2.11.0")
testImplementation("org.testng:testng:7.7.1")
"functionalTestImplementation"("com.fasterxml.jackson.core:jackson-databind:2.14.2")
"functionalTestImplementation"("commons-io:commons-io:2.11.0")
"functionalTestImplementation"("org.testng:testng:7.7.1")
"functionalTestImplementation"(project)
}
pluginBundle {
website = "https://github.com/jfrog/gradle-dep-tree"
vcsUrl = "https://github.com/jfrog/gradle-dep-tree"
tags = listOf("gradle", "dependencies", "dependency-tree")
}
gradlePlugin {
isAutomatedPublishing = false
plugins {
create("gradleDepTree") {
id = "com.jfrog.gradle-dep-tree"
displayName = "Gradle Dependency Tree"
description = "A plugin that generates a Gradle dependency tree in Json format"
implementationClass = "com.jfrog.GradleDepTree"
}
}
testSourceSets(functionalTest)
}
tasks.withType<Test>().configureEach {
useTestNG {
useDefaultListeners(true)
}
testLogging {
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
events("started", "passed", "skipped", "failed", "standardOut", "standardError")
minGranularity = 0
}
}
val functionalTestTask = tasks.register<Test>("functionalTest") {
description = "Runs the functional tests."
group = "verification"
testClassesDirs = functionalTest.output.classesDirs
classpath = functionalTest.runtimeClasspath
mustRunAfter(tasks.test)
}
tasks.check {
dependsOn(functionalTestTask)
}
java {
withJavadocJar()
withSourcesJar()
}
nexusPublishing {
repositories {
sonatype()
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
pom {
name.set("gradle-dep-tree")
description.set("JFrog gradle-dep-tree")
url.set("https://github.com/jfrog/gradle-dep-tree")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("JFrog")
email.set("eco-system@jfrog.com")
}
}
scm {
connection.set("scm:git:git://github.com/jfrog/gradle-dep-tree.git")
developerConnection.set("scm:git:git@github.com/jfrog/gradle-dep-tree.git")
url.set("https://github.com/jfrog/gradle-dep-tree")
}
}
from(components["java"])
}
}
}
signing {
if (project.hasProperty("sign")) {
val signingKey: String? = findProperty("signingKey")?.toString()
val signingPassword: String? = findProperty("signingPassword")?.toString()
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["mavenJava"])
}
}