jruby-gradle-plugin/jar-plugin/build.gradle

111 lines
2.7 KiB
Groovy

ext {
testRepoDir = new File(buildDir,'tmp/test/repo' )
}
configurations {
testRepo
/* this configuration is to dump old versions of things into the flatrepo */
testRepoOldFiles
}
generateTestConfig {
testProperties mavenrepo: new File(project(':jruby-gradle-plugin').projectDir,'src/integTest/mavenrepo').absolutePath,
flatrepo: testRepoDir.absolutePath
}
dependencies {
compile project(':jruby-gradle-plugin')
/*
* NOTE: version 5.0.0 of the shadow plugin supports only Gradle 5.x and later
*/
compile 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
compile 'org.codehaus.plexus:plexus-utils:[3.2.0,3.3)'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'org.ow2.asm:asm-commons:[6.1,6.99)'
compile 'org.apache.ant:ant:[1.10.6,2.0)'
testCompile (spockVersion) {
exclude module : 'groovy-all'
}
// For the testRepo tests I am locking the versions, instead of a open version, as it makes
// unit testing easier, This does not affect the final artifact.
// If you change values here, you need to update JRubyJarPluginSpec as well.
testRepo ("org.jruby:jruby-complete:${jrubyVersion}") {
transitive = false
}
testRepo ('rubygems:jar-dependencies:0.1.15') {
transitive = false
}
testRepo ('org.jruby.mains:jruby-mains:0.6.1') {
transitive = false
}
testRepoOldFiles ('de.saumya.mojo:jruby-mains:0.3.0') {
transitive = false
}
testRepoOldFiles ("org.jruby:jruby-complete:1.7.11") {
transitive = false
}
testRepo (spockVersion) {
transitive = false
}
}
task prepareTestRepo( type : Copy ) {
into testRepoDir
from project.configurations.testRepo
from project.configurations.testRepoOldFiles
}
test {
dependsOn prepareTestRepo
}
groovydoc {
docTitle = "${archivesBaseName} ${version}"
}
task installGroovyDoc (type : Copy) {
from ({new File(buildDir,'docs/groovydoc')}) {
include '**'
}
into {new File(project.properties.jrubyGradleWebsiteInstallDir,"docs/api/${archivesBaseName}/${version}")}
onlyIf { project.hasProperty('jrubyGradleWebsiteInstallDir') }
}
artifacts {
archives sourcesJar
}
pluginBundle {
plugins {
gradlePlugin {
id = 'com.github.jruby-gradle.jar'
displayName = 'JRuby/Gradle base plugin'
description = 'This plugin encapsulates java archive building functionality for JRuby Gradle projects'
tags = (['jruby','fatjar'])
}
}
}
gradleTest {
dependsOn jar
mustRunAfter test, integrationTest
enabled = false // TODO: Fix jar plugin as it has a DoS in jar construction.
}
integrationTest {
dependsOn prepareTestRepo
}
// vim: ft=groovy