-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.gradle
83 lines (73 loc) · 2.15 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
import java.time.Duration
plugins {
id 'java-library'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id "org.openjfx.javafxplugin" version "0.1.0" apply false
}
if (System.getProperty('os.name').toLowerCase().contains("mac")) {
new ByteArrayOutputStream().withStream { os ->
exec {
args '-version', '-sdk', 'iphoneos', 'SDKVersion'
executable 'xcodebuild'
standardOutput = os
}
ext.IOS_VERSION = os.toString().trim()
println "IOS version: $IOS_VERSION"
}
} else {
ext.IOS_VERSION = ""
}
subprojects {
apply plugin: "org.openjfx.javafxplugin"
apply from: rootProject.file('gradle/mavenPublish.gradle')
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenCentral()
}
javafx {
version = "20.0.2"
modules 'javafx.graphics'
}
}
nexusPublishing {
packageGroup = 'com.gluonhq'
repositories {
sonatype {
username = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : ''
password = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : ''
}
}
clientTimeout = Duration.ofMinutes(5)
connectTimeout = Duration.ofMinutes(5)
transitionCheckOptions {
maxRetries.set(50)
delayBetween.set(Duration.ofSeconds(10))
}
}
task copyModuleSources {
doFirst {
subprojects.each {p ->
copy {
from p.sourceSets.main.java
into "${buildDir}/modules/sources/${p.ext.moduleName}"
}
}
}
}
javadoc {
doFirst {
subprojects.each {p -> classpath += p.sourceSets.main.compileClasspath }
options.modulePath = new ArrayList(classpath.files)
}
exclude("com/gluonhq/attach/*/impl")
source fileTree("${buildDir}/modules/sources")
options.addStringOption("-module-source-path", "$buildDir/modules/sources")
classpath = files()
title "Attach ${project.version} API"
dependsOn copyModuleSources
}
// Do not publish Gradle modules
tasks.withType(GenerateModuleMetadata) {
enabled = false
}