-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
97 lines (81 loc) · 2.77 KB
/
build.gradle
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
import org.gradle.internal.jvm.Jvm
plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id "net.researchgate.release" version "3.0.2"
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
allprojects {
group "com.datadoghq"
version "$version"
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "signing"
java {
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
publishing {
publications {
maven(MavenPublication) { MavenPublication publication ->
publication.from components.java
}
}
}
signing {
useInMemoryPgpKeys(System.getenv("GPG_PRIVATE_KEY"), System.getenv("GPG_PASSWORD"))
sign publishing.publications.maven
}
tasks.withType(GenerateMavenPom).configureEach {
doFirst {
MavenPom pom = it.pom
pom.name = project.name
pom.description = project.description
pom.packaging = "jar"
pom.url = "https://github.com/datadog/dd-javac-plugin"
pom.licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "repo"
}
}
pom.scm {
connection = "scm:https://datadog@github.com/datadog/dd-javac-plugin"
developerConnection = "scm:git@github.com:datadog/dd-javac-plugin.git"
url = "https://github.com/datadog/dd-javac-plugin"
}
pom.developers {
developer {
id = "datadog"
name = "Datadog"
}
}
}
}
}
description = "Datadog Java Compiler Plugin"
def launcher8 = javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(8)) }
def javaHome8 = launcher8.map { it.metadata.installationPath.asFile }
def jvm8 = Jvm.forHome(javaHome8.get())
apply from: "$rootDir/gradle/java8-compile.gradle"
apply from: "$rootDir/gradle/multi-release.gradle"
apply from: "$rootDir/gradle/publishing.gradle"
apply from: "$rootDir/gradle/test.gradle"
dependencies {
compileOnly files(jvm8.toolsJar)
api "org.burningwave:core:12.65.1"
api project(":dd-javac-plugin-client")
testImplementation "org.junit.jupiter:junit-jupiter-api:5.9.2"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.9.2"
testImplementation "commons-io:commons-io:2.11.0"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.9.2"
testRuntimeOnly files(jvm8.toolsJar)
}