-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
99 lines (86 loc) · 2.73 KB
/
Copy pathbuild.gradle
File metadata and controls
99 lines (86 loc) · 2.73 KB
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
plugins {
id 'java-gradle-plugin'
id 'com.vanniktech.maven.publish' version '0.33.0'
}
group = 'org.flixelgdx'
version = '0.2.1'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileJava {
// jdk.javadoc and jdk.compiler are JDK-specific modules not in java.se;
// explicitly adding them ensures the compiler can resolve the doclet API.
// --release is intentionally absent: ct.sym does not cover jdk.* module APIs,
// so restricting the API surface hides valid com.sun.source.* methods.
options.compilerArgs += ['--add-modules', 'jdk.javadoc,jdk.compiler']
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.vladsch.flexmark:flexmark-all:0.64.8'
testImplementation gradleTestKit()
testImplementation platform('org.junit:junit-bom:5.10.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
gradlePlugin {
plugins {
docletmd {
id = 'org.flixelgdx.docletmd'
implementationClass = 'org.flixelgdx.docletmd.DocletMDPlugin'
}
}
}
test {
useJUnitPlatform()
// Make jdk.javadoc available at test runtime so the documentation tool
// can be located via ToolProvider in the same JVM.
jvmArgs '--add-modules', 'jdk.javadoc,jdk.compiler'
}
tasks.register('collectRuntimeJars', Copy) {
from jar
from configurations.runtimeClasspath
into layout.buildDirectory.dir('runtime-jars')
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
// Maven Central publishing via Sonatype Central Portal.
mavenPublishing {
publishToMavenCentral('CENTRAL_PORTAL')
// Sign only when signing credentials are present (CI and Maven Central releases).
// Local `publishToMavenLocal` runs don't need signatures.
def hasSigning = findProperty('signing.keyId') != null
|| findProperty('signingInMemoryKeyId') != null
if (hasSigning) {
signAllPublications()
}
coordinates('org.flixelgdx', 'docletmd', version as String)
pom {
name = 'DocletMD'
description = 'Gradle plugin that turns Javadoc comments into Docusaurus-ready Markdown.'
url = 'https://github.com/flixelgdx/DocletMD'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
distribution = 'repo'
}
}
developers {
developer {
id = 'stringdotjar'
name = 'String'
email = 'stringfromjava@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/flixelgdx/DocletMD.git'
developerConnection = 'scm:git:ssh://git@github.com/flixelgdx/DocletMD.git'
url = 'https://github.com/flixelgdx/DocletMD'
}
}
}