-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
93 lines (79 loc) · 2.47 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
plugins {
id 'biz.aQute.bnd.builder' version "7.0.0"
id 'org.ajoberstar.git-publish' version '4.2.0'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id "com.github.node-gradle.node" version "7.0.1"
id 'eclipse'
// Make available, don't apply
id 'org.ajoberstar.grgit' version '5.2.0' apply false
id 'pl.allegro.tech.build.axion-release' version '1.17.2' apply false
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
allprojects {
// Group must be set early for release plugin to work.
group = 'org.jgrapes'
}
ext {
isCiBuild = System.getenv().get("CI") == 'true'
isJitPackBuild = System.getenv().get("JITPACK") == 'true'
}
// Prepare github authentication for plugins
if (System.properties['org.ajoberstar.grgit.auth.username'] == null) {
System.setProperty('org.ajoberstar.grgit.auth.username',
project.rootProject.properties['repo.access.token'] ?: "nouser")
}
// subprojects {
// rootProject.evaluationDependsOn(project)
// }
gitPublish {
repoUri = 'https://github.com/mnlipp/jgrapes.git'
branch = 'gh-pages'
contents {
from("${buildDir}/javadoc") {
into 'javadoc-webconsole'
}
from("${buildDir}/aashdoc") {
into 'aashdoc'
}
}
preserve { include '**/*' }
commitMessage = "Updated."
}
// Delay reset (checkout)
tasks.gitPublishReset.mustRunAfter ":org.jgrapes.webconsole.base:buildDoc"
tasks.gitPublishReset.mustRunAfter ":aash-vue-components:buildDoc"
task stage {
description = 'To be executed by CI, build and update JavaDoc.'
group = 'build'
// Build everything first
subprojects.findAll { it.name != 'cnf' }.each { dependsOn("${it.name}:build") }
dependsOn ":aash-vue-components:buildDoc"
dependsOn ":org.jgrapes.webconsole.base:buildDoc"
if (!isCiBuild || JavaVersion.current() == JavaVersion.VERSION_21) {
// Publish JavaDoc
dependsOn gitPublishPush
}
}
configure(stage) {
description = 'To be executed by travis, build and update JavaDoc.'
group = 'build'
}
nexusPublishing {
repositories {
sonatype {
username = project.properties['sonatypeTokenKey'] ?: "nouser"
password = project.properties['sonatypeTokenSecret'] ?: "nopass"
}
}
}
eclipse {
project {
file {
project.natures += 'org.eclipse.buildship.core.gradleprojectnature'
project.buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
}
}
}