Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
125 lines (106 sloc) 4.26 KB
/*
* Copyright (c) 2010-2010 LinkedIn, Inc
* Portions Copyright (c) 2011 Yan Pujante
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
buildscript {
repositories {
if(project.hasProperty('maven.buildscript.repository'))
{
mavenRepo urls: new File(project.properties["maven.buildscript.repository"]).toURI()
}
if(project.hasProperty('ivy.buildscript.repository'))
{
add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
name = "ivy.buildscript.repository"
addIvyPattern "${project.properties['ivy.buildscript.repository']}/[organisation]/[module]/[revision]/[module]-[revision].ivy"
addArtifactPattern "${project.properties['ivy.buildscript.repository']}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
m2compatible = true
checkmodified = true
}
}
// if you want to disallow maven central
if(project.properties['no.maven.central'] != 'true')
{
mavenCentral()
}
}
dependencies {
classpath 'org.linkedin:org.linkedin.gradle-plugins:1.5.0'
}
}
apply plugin: 'org.linkedin.userConfig'
apply plugin: 'org.linkedin.spec'
topBuildDir = userConfig.top.build.dir ?: "${rootDir}/out/build"
apply plugin: 'org.linkedin.repository'
consoleKeys = fileTree(dir: 'dev-keys',
includes: ['console.keystore', 'agent.truststore', 'console.secretkeystore'])
agentKeys = fileTree(dir: 'dev-keys',
includes: ['console.truststore', 'agent.keystore'])
packageIncludesFiles = [
'LICENSE.txt',
'NOTICE.txt',
'README.md',
'RELEASE.rst',
'RESTLET-2.0.1-EPL-LICENSE.html',
'SIGAR-1.6.4-LICENSE.txt'
]
packageIncludes = fileTree(dir: rootDir, includes: packageIncludesFiles)
allprojects {
apply plugin: 'idea'
group = spec.group
version = spec.version
}
def ideaCopyright = """
<component name="CopyrightManager" default="LinkedIn Apache 2.0">
<copyright>
<option name="notice" value="Copyright (c) ${userConfig.copyright ?: '2010-&amp;#36;today.year LinkedIn, Inc'}&#10;&#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not&#10;use this file except in compliance with the License. You may obtain a copy of&#10;the License at&#10;&#10;http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT&#10;WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the&#10;License for the specific language governing permissions and limitations under&#10;the License." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="" />
<option name="myName" value="LinkedIn Apache 2.0" />
<option name="myLocal" value="true" />
</copyright>
<module2copyright>
<element module="All" copyright="LinkedIn Apache 2.0" />
</module2copyright>
</component>
"""
// customizing idea project
ideaProject {
withXml { root ->
root = root.asNode()
root.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
def copyrightNode = root.component.find { it.@name == 'CopyrightManager'}
root.remove(copyrightNode)
root.append(new XmlParser().parseText(ideaCopyright))
}
}
subprojects {
buildscript {
allRepositories.buildscript.configure(repositories)
}
apply plugin: 'maven'
allRepositories.build.configure(repositories)
if(repositories.findByName('restlet'))
{
// this is required because of bad pom files :(
repositories.restlet.checkconsistency = false
}
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
buildDir = "${topBuildDir}${project.path.replace(':','/')}".toString()
}
task clean(type: Delete) {
delete topBuildDir
}
Something went wrong with that request. Please try again.