Skip to content

Instantly share code, notes, and snippets.

@ghale
Created November 9, 2015 20:13
Show Gist options
  • Save ghale/b45bbb804d5d438cb212 to your computer and use it in GitHub Desktop.
Save ghale/b45bbb804d5d438cb212 to your computer and use it in GitHub Desktop.
example of redistributing gradle with init scripts
apply plugin: "base"
apply plugin: "maven-publish"
repositories {
maven {
url "http://repo.gradle.org/gradle/gradle"
}
}
configurations {
distributions
}
dependencies {
distributions "org.gradle:gradle:${gradleVersion}"
}
task repackageZip(type: Zip) {
from { zipTree(configurations.distributions.singleFile) }
into("gradle-${gradleVersion}/init.d") {
from "init-scripts"
}
baseName = "gradle"
version = gradleVersion
appendix = "ford"
classifier = "all"
}
publishing {
publications {
gradleDistribution(MavenPublication) {
artifact repackageZip
artifactId = "gradle"
groupId = "com.ford.tools"
version = gradleVersion
}
}
repositories {
maven {
url "http://ford_repo"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment