forked from Abnaxos/markdown-doclet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle
37 lines (35 loc) · 1.24 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
include 'doclet'
include 'integrations:idea-plugin'
include 'integrations:gradle-plugin'
rootProject.name = 'pegdown-doclet'
gradle.projectsLoaded {
def loadProperties
loadProperties = { Project prj, Properties props, Object prjPath->
if ( prj.parent != null ) {
loadProperties(prj.parent, props, prjPath)
}
File localProperties = new File(prj.projectDir, 'local.properties')
try {
if ( localProperties.isFile() ) {
logger.info "local.properties: [$prjPath] Loading $localProperties"
new FileInputStream(localProperties).with {
props.load(it)
}
}
else {
logger.debug "local.properties: [$prjPath] Not present: $localProperties"
}
}
catch ( Exception e ) {
throw new GradleException("[$prjPath] Failed to load $localProperties: $e", e)
}
}
gradle.allprojects { prj ->
Properties props = new Properties()
loadProperties(prj, props, prj.path)
logger.debug "local.properties: [$prj.path] Final property overrides: $props"
props.each { entry ->
prj[(String)entry.key] = entry.value
}
}
}