-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
77 lines (63 loc) · 2.23 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
import aQute.bnd.osgi.Processor
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:6.1.0'
classpath 'com.github.node-gradle:gradle-node-plugin:3.2.1'
classpath 'org.ajoberstar.grgit:grgit-gradle:4.1.0'
classpath 'org.ajoberstar:gradle-git-publish:3.0.0'
}
}
plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'pl.allegro.tech.build.axion-release' version '1.15.0' apply false
}
nexusPublishing {
repositories {
sonatype {
username = project.properties['sonatypeTokenKey'] ?: "nouser"
password = project.properties['sonatypeTokenSecret'] ?: "nopass"
}
}
}
ext {
isCiBuild = System.getenv().get("CI") == 'true'
isJitPackBuild = System.getenv().get("JITPACK") == 'true'
}
allprojects {
repositories {
mavenCentral()
// Sometimes, synchronization with central is too slow
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
// Snapshots
// maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
// Experimental, not sure if this is the way tpo go...
maven { url 'https://jitpack.io' }
}
group = 'org.jgrapes'
}
subprojects {
apply from: "${project.rootDir}/gradle/subprojects.gradle"
// Must be applied after configuring the subprojects,
// can therefore not be applied in allprojects.
apply from: "${project.rootDir}/gradle/eclipse.gradle"
}
apply from: "${project.rootDir}/gradle/eclipse.gradle"
apply from: "${project.rootDir}/gradle/docgen.gradle"
// 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")
}
task stage {
description = 'To be executed by CI, build and update JavaDoc.'
group = 'build'
// Build everything first
dependsOn subprojects.tasks.collect { tc -> tc.findByName("build") }.flatten()
if (!isCiBuild || JavaVersion.current() == JavaVersion.VERSION_21) {
// Publish JavaDoc
dependsOn gitPublishPush
}
}