-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
177 lines (150 loc) · 6.17 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
buildscript {
repositories {
gradlePluginPortal()
maven {
url "https://sandec.jfrog.io/artifactory/repo"
}
}
dependencies {
classpath "com.google.gradle:osdetector-gradle-plugin:$OSDETECTOR_PLUGIN_VERSION"
classpath "org.openjfx:javafx-plugin:$JAVAFX_PLUGIN_VERSION"
classpath "one.jpro:jpro-gradle-plugin:$JPRO_VERSION"
classpath "org.owasp:dependency-check-gradle:$DEPENDENCY_CHECK_PLUGIN_VERSION"
classpath "tech.yanand.gradle:maven-central-publish:$MAVEN_CENTRAL_PUBLISH_PLUGIN_VERSION"
}
}
subprojects {
apply plugin: 'java'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven {
url "https://sandec.jfrog.io/artifactory/repo"
}
}
}
configure(subprojects.findAll { it.name != 'example' }) {
apply plugin: 'java-library'
apply plugin: 'org.openjfx.javafxplugin'
apply plugin: 'org.owasp.dependencycheck'
javafx {
version = "$JAVAFX_BUILD_VERSION"
configurations = ["compileOnly", "testImplementation"]
modules = ['javafx.graphics', 'javafx.controls', 'javafx.fxml', 'javafx.media', 'javafx.swing', 'javafx.web']
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:$JUNIT_VERSION"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$JUNIT_VERSION"
testImplementation "one.jpro:jmemorybuddy:$JMEMORYBUDDY_VERSION"
testImplementation "one.jpro.platform.jpms:testfx-junit5:$TESTFX_VERSION"
testImplementation "one.jpro.platform.jpms:testfx-core:$TESTFX_VERSION"
testImplementation "one.jpro.platform.jpms:openjfx-monocle:$MONOCLE_VERSION"
testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
testImplementation "org.mockito:mockito-junit-jupiter:$MOCKITO_VERSION"
testImplementation "org.hamcrest:hamcrest:$HAMCREST_VERSION"
testImplementation "org.assertj:assertj-core:$ASSERTJ_VERSION"
testRuntimeOnly "ch.qos.logback:logback-classic:$LOGBACK_VERSION"
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
showStandardStreams = true
showExceptions true
showCauses true
showStackTraces true
exceptionFormat "full"
}
}
dependencyCheck {
autoUpdate = true
format = 'ALL'
nvd {
apiKey = System.getenv("SANDEC_NVD_API_KEY")
}
outputDirectory = layout.buildDirectory.dir("reports/dependency-check").get().asFile
}
}
configure([project("jpro-auth:core"), project("jpro-auth:routing"), project("jpro-file"),
project("jpro-image-manager"), project("jpro-mail"), project("jpro-mdfx"), project("jpro-media"),
project("jpro-scenegraph"), project("jpro-session"), project("jpro-sipjs"), project("jpro-utils"),
project("jpro-html-scrollpane"), project("jpro-routing:core"), project("jpro-routing:dev"),
project("jpro-routing:popup"), project("jpro-webrtc"), project("jpro-youtube")]) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'tech.yanand.maven-central-publish'
// Check if the parent of the current project is a subproject
def isParentASubproject = project.parent != null && project.parent != rootProject
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'one.jpro.platform'
artifactId = isParentASubproject ? "${project.parent.name}-${project.name}" : "${project.name}"
version = JPRO_PLATFORM_VERSION
// Ensure only one component is included in the publication
from components.java
pom {
url = 'https://www.jpro.one'
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'jpro'
name = 'JPro Team'
email = '[email protected]'
organization = 'JPro-one'
organizationUrl = 'https://www.jpro.one'
}
}
scm {
connection = 'scm:git:https://github.com/JPro-one/jpro-platform.git'
developerConnection = 'scm:git:https://github.com/JPro-one/jpro-platform.git'
url = "https://github.com/JPro-one/jpro-platform/tree/main/$project.name"
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/JPro-one/JPro-Platform/issues'
}
}
}
}
java {
withSourcesJar()
withJavadocJar()
}
repositories {
maven {
name = "artifactory"
url = "https://sandec.jfrog.io/artifactory/repo"
credentials {
username System.getenv("SANDEC_ARTIFACTORY_USERNAME")
password System.getenv("SANDEC_ARTIFACTORY_PASSWORD")
}
}
maven {
name = 'publish-bundle'
url = layout.buildDirectory.dir('publish-bundle')
}
}
}
signing {
useInMemoryPgpKeys (
System.getenv("SANDEC_SIGNING_KEY_ID"),
System.getenv("SANDEC_SIGNING_SECRET_KEY"),
System.getenv("SANDEC_SIGNING_PASSWORD")
)
sign publishing.publications.mavenJava
}
mavenCentral {
repoDir = layout.buildDirectory.dir('publish-bundle')
authToken = System.getenv("MAVEN_CENTRAL_AUTH_TOKEN")
publishingType = System.getenv("MAVEN_CENTRAL_PUBLISHING_TYPE") ?: 'USER_MANAGED'
}
}