forked from bndtools/bndtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle
51 lines (47 loc) · 1.16 KB
/
settings.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
/*
* Master Gradle initialization script
*/
import aQute.bnd.osgi.Constants
/* Add bnd gradle plugin as a script dependency */
buildscript {
repositories {
mavenCentral()
maven {
url uri(bnd_repourl)
}
}
dependencies {
classpath bnd_plugin
}
/* Since the files in the repository change with each build, we need to recheck for changes */
configurations.classpath {
resolutionStrategy {
cacheChangingModulesFor 30, 'minutes'
cacheDynamicVersionsFor 30, 'minutes'
}
}
dependencies {
components {
all { ComponentMetadataDetails details ->
details.changing = true
}
}
}
/* Add bnd gradle plugin to buildscript classpath of rootProject */
def bndPlugin = files(configurations.classpath.files)
gradle.rootProject {
buildscript {
dependencies {
classpath bndPlugin
}
}
}
}
gradle.ext.bndWorkspaceConfigure = { workspace ->
workspace.setProperty('bnd_repourl', uri(bnd_repourl).toString())
/*
* Compute the build time stamp.
*/
workspace.setProperty(Constants.TSTAMP, Long.toString(System.currentTimeMillis()))
}
apply plugin: 'biz.aQute.bnd.workspace'