-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (87 loc) · 2.4 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
98
plugins {
id 'java-library'
id 'org.openjfx.javafxplugin' version '0.1.0'
id "maven-publish"
id 'signing'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
javafx {
version = '21'
modules = ['javafx.controls']
configurations = ['compileOnly', 'testImplementation']
}
group 'io.github.tnlx'
version '0.1.0'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.squareup:javapoet:1.13.0'
testImplementation 'com.squareup:javapoet:1.13.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation 'com.google.testing.compile:compile-testing:0.19'
}
test {
useJUnitPlatform()
doFirst {
jvmArgs = [
'--add-opens', 'jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED'
]
}
}
// OSSRH requires javadoc and sources https://central.sonatype.org/pages/requirements.html
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
jfxoo(MavenPublication) {
from(components.java)
// POM metadata
pom {
name = artifactId
description = "Generate JavaFX Form at compile time"
url = "https://github.com/tnlx/jfxoo"
licenses {
license {
name = "MIT"
url = "https://opensource.org/licenses/MIT"
}
}
developers {
developer {
id = "tnlx"
name = "Thuc Le"
}
}
scm {
connection = "scm:git:https://github.com/tnlx/jfxoo"
developerConnection = "scm:git:ssh://github.com/tnlx/jfxoo.git"
url = "https://github.com/tnlx/jfxoo"
}
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.jfxoo
}
// ./gradlew publishJfxooPublicationToLocalRepository
// tree ./build/pub/
publishing {
repositories {
maven {
name = "local"
url = rootProject.layout.buildDirectory.dir("pub")
}
}
}