-
Notifications
You must be signed in to change notification settings - Fork 5
/
common.gradle
64 lines (55 loc) · 2.18 KB
/
common.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
UIDesigner {
version '1.19.1'
}
println 'Remove gradle nodejs cache folder'
delete files("${rootProject.projectDir}/.gradle/nodejs")
allprojects {
apply plugin: 'distribution'
apply plugin: 'maven-publish'
apply plugin: 'com.github.node-gradle.node'
group 'org.bonitasoft.web.page'
repositories {
// Keep me! Required for interoperability with maven built dependencies (UI Designer)
// https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local
mavenLocal()
mavenCentral()
if (project.hasProperty("extraRepositories")) {
def extraRepositories = project.getProperties().get("extraRepositories")
extraRepositories.split(",").each { repo ->
def repoProperties = repo.split("::")
maven {
name = repoProperties.first()
url = repoProperties.last()
//those credentials can be given using -P<repo_name>Username and -P<repo_name>Password see README.md
credentials(PasswordCredentials)
}
}
}
}
node {
version = Versions.nodeVersion
// Use the same location for all subprojects
workDir = file("${rootProject.projectDir}/.gradle/nodejs")
download = !workDir.getAsFile().get().exists()
}
nodeSetup {
onlyIf {
!com.github.gradle.node.NodeExtension.get(project).workDir.get().getAsFile().exists()
}
}
// Disable tar distribution declared by the distribution plugin, only distZip is used
distTar.enabled = false
publishing {
repositories {
if (project.hasProperty("altDeploymentRepository")) {
def repoProperties = project.getProperties()."altDeploymentRepository".split("::")
maven {
name = repoProperties.first()
url = repoProperties.last()
//those credentials can be given using -P<repo_name>Username and -P<repo_name>Password see README.md
credentials(PasswordCredentials)
}
}
}
}
}