2015-06-08 14:10:03 +00:00
|
|
|
archivesBaseName = 'jruby-gradle-plugin'
|
2015-08-11 23:49:17 +00:00
|
|
|
apply from: "${rootProject.projectDir}/gradle/integration-tests.gradle"
|
2014-08-08 19:58:06 +00:00
|
|
|
|
2015-09-16 15:40:20 +00:00
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
|
2014-08-22 20:59:35 +00:00
|
|
|
// --- Could be in a separate gradle file
|
|
|
|
configurations {
|
|
|
|
testJRubyPrepare
|
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
|
|
|
jrubyClassPathFromConfiguration = { Configuration cfg ->
|
|
|
|
def f = cfg.files.find { it.name.startsWith('jruby-complete-') }
|
|
|
|
return f?.absolutePath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project.afterEvaluate {
|
|
|
|
test {
|
|
|
|
systemProperties TEST_JRUBY_CLASSPATH: "${jrubyClassPathFromConfiguration(configurations.testJRubyPrepare)}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// --- up to here
|
|
|
|
|
2014-08-08 19:34:40 +00:00
|
|
|
dependencies {
|
2015-08-19 20:58:01 +00:00
|
|
|
|
|
|
|
compile "org.eclipse.jetty:jetty-server:${jettyVersion}"
|
|
|
|
compile "org.eclipse.jetty:jetty-webapp:${jettyVersion}"
|
2015-12-31 11:04:20 +00:00
|
|
|
runtime( 'de.saumya.mojo:rubygems:0.2.3@war' ) {
|
2015-08-19 20:58:01 +00:00
|
|
|
// we just want the war file on the classloader for the application
|
|
|
|
// to find it and use the war-file from filesystem
|
|
|
|
exclude group: 'org.sonatype.nexus.plugins', module: 'nexus-ruby-tools'
|
|
|
|
}
|
|
|
|
|
2015-08-08 17:50:48 +00:00
|
|
|
testJRubyPrepare "org.jruby:jruby-complete:${jrubyVersion}"
|
|
|
|
|
2014-08-21 01:22:24 +00:00
|
|
|
testCompile (spockVersion) {
|
2014-08-18 21:51:09 +00:00
|
|
|
exclude module : 'groovy-all'
|
|
|
|
}
|
2014-08-22 20:59:35 +00:00
|
|
|
|
2014-08-21 01:22:24 +00:00
|
|
|
integrationTestCompile (spockVersion) {
|
2014-08-20 11:54:26 +00:00
|
|
|
exclude module : 'groovy-all'
|
|
|
|
}
|
2014-09-05 12:55:37 +00:00
|
|
|
|
2014-11-15 04:11:58 +00:00
|
|
|
// NOTE: If you change this, you will also need to update JRubyPrepareGemsIntegrationSpec
|
|
|
|
integrationTestGems 'rubygems:slim:2.0.2'
|
|
|
|
|
2015-04-22 09:58:32 +00:00
|
|
|
// NOTE: If you change this, you will also need to update JRubyPrepareJarsIntegrationSpec
|
|
|
|
integrationTestGems 'rubygems:leafy-complete:0.4.0'
|
|
|
|
|
2014-11-15 04:11:58 +00:00
|
|
|
// NOTE: If you change this, you will also need to update JRubyExecIntegrationSpec & JRubyExecExtensionIntegrationSpec
|
|
|
|
integrationTestGems 'rubygems:credit_card_validator:1.1.0'
|
|
|
|
|
2014-11-18 02:00:47 +00:00
|
|
|
// NOTE: If you change this, you will also need to update JRubyExecIntegrationSpec
|
|
|
|
integrationTestGems 'rubygems:rspec:3.1.0'
|
|
|
|
|
2014-11-15 04:11:58 +00:00
|
|
|
// NOTE: Leave this at .11 as it must be an older version. if
|
|
|
|
// you change it here you will also need to update JRubyExecIntegrationSpec
|
2017-11-28 20:38:53 +00:00
|
|
|
integrationTestGems "org.jruby:jruby-complete:9.0.1.0"
|
2015-05-06 14:29:50 +00:00
|
|
|
|
2015-06-25 17:59:49 +00:00
|
|
|
// NOTE: older jruby versions needs this for exec to work properly
|
|
|
|
integrationTestGems "rubygems:jar-dependencies:0.1.15"
|
|
|
|
|
2015-08-19 20:58:01 +00:00
|
|
|
// NOTE: If you change this, you will also need to update JRubyExecExtensionIntegrationSpec
|
|
|
|
integrationTestGems 'org.bouncycastle:bcprov-jdk15on:1.46'
|
|
|
|
|
2018-08-04 11:46:04 +00:00
|
|
|
gradleTest"org.jruby:jruby-complete:${jrubyVersion}"
|
2015-05-06 14:29:50 +00:00
|
|
|
gradleTest 'rubygems:credit_card_validator:1.1.0'
|
|
|
|
gradleTest 'org.bouncycastle:bcprov-jdk15on:1.50'
|
2014-08-08 19:58:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
2014-08-15 23:19:33 +00:00
|
|
|
systemProperties TESTROOT : new File(buildDir,'tmp/test/unittests').absolutePath
|
2014-08-22 20:59:35 +00:00
|
|
|
systemProperties TEST_GEM_DIR : new File(projectDir,'src/integTest/resources/gems').absolutePath
|
2014-08-19 15:44:42 +00:00
|
|
|
systemProperties 'logback.configurationFile' : new File(projectDir,'src/test/resources/logback-test.xml').absolutePath
|
2014-08-15 23:19:33 +00:00
|
|
|
|
2015-06-06 20:46:52 +00:00
|
|
|
if (gradle.startParameter.isOffline()) {
|
2014-10-07 12:24:53 +00:00
|
|
|
systemProperties 'TESTS_ARE_OFFLINE' : '1'
|
|
|
|
}
|
2014-08-20 11:54:26 +00:00
|
|
|
}
|
|
|
|
|
2014-11-15 04:11:58 +00:00
|
|
|
task copyIntegrationTestJRuby (type:Copy) {
|
|
|
|
from ({configurations.testJRubyPrepare.files})
|
|
|
|
into new File(buildDir,'tmp/integrationTest/flatRepo')
|
|
|
|
}
|
|
|
|
|
2014-08-20 11:54:26 +00:00
|
|
|
integrationTest {
|
2014-11-18 02:00:47 +00:00
|
|
|
systemProperties TESTROOT : new File(buildDir,'tmp/integrationTest/root').absolutePath
|
|
|
|
systemProperties CACHEDIR : new File(buildDir,'tmp/integrationTest/cache').absolutePath
|
|
|
|
systemProperties FLATREPO : new File(buildDir,'tmp/integrationTest/flatRepo').absolutePath
|
2014-08-20 11:54:26 +00:00
|
|
|
systemProperties TEST_SCRIPT_DIR : new File(projectDir,'src/integTest/resources/scripts').absolutePath
|
|
|
|
systemProperties 'logback.configurationFile' : new File(projectDir,'src/integTest/resources/logback-test.xml').absolutePath
|
|
|
|
|
2014-08-18 21:51:09 +00:00
|
|
|
if(gradle.startParameter.isOffline()) {
|
|
|
|
systemProperties 'TESTS_ARE_OFFLINE' : '1'
|
|
|
|
}
|
2014-11-15 04:11:58 +00:00
|
|
|
|
|
|
|
dependsOn copyIntegrationTestJRuby
|
2014-08-08 19:34:40 +00:00
|
|
|
}
|
|
|
|
|
2014-11-15 04:11:58 +00:00
|
|
|
|
|
|
|
|
2014-12-29 19:47:55 +00:00
|
|
|
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') }
|
|
|
|
}
|
|
|
|
|
2015-09-16 15:40:20 +00:00
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
groupId project.group
|
|
|
|
artifactId project.archivesBaseName
|
|
|
|
version project.version
|
|
|
|
|
2015-09-16 16:15:36 +00:00
|
|
|
artifact sourcesJar {
|
|
|
|
classifier "sources"
|
|
|
|
}
|
|
|
|
|
2015-09-16 15:40:20 +00:00
|
|
|
from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-08-10 23:53:58 +00:00
|
|
|
bintray {
|
|
|
|
user = project.bintrayUser
|
|
|
|
key = project.bintrayKey
|
|
|
|
publish = true
|
|
|
|
dryRun = false
|
2015-09-16 15:40:20 +00:00
|
|
|
publications = ['maven']
|
2014-08-10 23:53:58 +00:00
|
|
|
|
|
|
|
pkg {
|
2014-08-26 14:41:32 +00:00
|
|
|
userOrg = 'jruby-gradle'
|
|
|
|
repo = 'plugins'
|
2014-08-10 23:53:58 +00:00
|
|
|
name = 'jruby-gradle-plugin'
|
2014-08-15 16:47:17 +00:00
|
|
|
labels = ['jruby']
|
2014-08-15 17:45:10 +00:00
|
|
|
|
|
|
|
version {
|
|
|
|
name = project.version
|
|
|
|
vcsTag = "v${project.version}"
|
2014-08-26 16:12:39 +00:00
|
|
|
attributes = ['gradle-plugin' : 'com.github.jruby-gradle.base:com.github.jruby-gradle:jruby-gradle-plugin']
|
2014-08-26 14:41:32 +00:00
|
|
|
desc = 'The purpose of plugin is to encapsulate useful Gradle functionality for JRuby projects.'
|
2014-08-15 17:45:10 +00:00
|
|
|
|
|
|
|
}
|
2014-08-10 23:53:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
bintrayUpload.dependsOn assemble
|
2014-08-11 00:26:53 +00:00
|
|
|
|
2017-09-27 10:36:44 +00:00
|
|
|
gradleTest.mustRunAfter integrationTest
|
2014-08-11 00:26:53 +00:00
|
|
|
// vim: ft=groovy
|