forked from gluonhq/attach
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
77 lines (68 loc) · 2.14 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
plugins {
id 'java-library'
id 'jp.classmethod.aws.s3' version '0.41'
id 'io.codearte.nexus-staging' version '0.21.1'
id "org.openjfx.javafxplugin" version "0.0.9" apply false
id 'de.marcphilipp.nexus-publish' version '0.4.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 {
modules 'javafx.graphics'
}
}
nexusStaging {
packageGroup = 'com.gluonhq'
username = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : ''
password = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : ''
numberOfRetries = 30
delayBetweenRetriesInMillis = 5000
}
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.addStringOption('-module-path', classpath.asPath)
}
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
}
task uploadJavadocToS3(type: jp.classmethod.aws.gradle.s3.SyncTask) {
source file("$buildDir/docs/javadoc/")
bucketName 'docs.gluonhq.com'
prefix "attach/javadoc/$project.version/"
acl 'PublicRead'
dependsOn javadoc
}