commit
33e844221f
|
@ -63,12 +63,12 @@ jobs:
|
|||
- name: UnitTest
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain --warning-mode=all --no-parallel test
|
||||
arguments: --console=plain --warning-mode=all --no-parallel test -i
|
||||
# Test
|
||||
- name: IntegrationTest
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain --warning-mode=all --no-parallel intTest
|
||||
arguments: --console=plain --warning-mode=all --no-parallel intTest -i
|
||||
# Test
|
||||
- name: CompatibilityTest
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
|
|
|
@ -25,6 +25,7 @@ package com.github.jrubygradle
|
|||
|
||||
import com.github.jrubygradle.testhelper.IntegrationSpecification
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import spock.lang.Ignore
|
||||
import spock.lang.IgnoreIf
|
||||
import spock.lang.Issue
|
||||
|
||||
|
@ -152,6 +153,7 @@ rubygems:tilt:2.0.9
|
|||
}
|
||||
|
||||
@Issue('https://github.com/jruby-gradle/jruby-gradle-plugin/issues/341')
|
||||
@Ignore
|
||||
void "Make an install-time gem dependency available"() {
|
||||
setup:
|
||||
withRubyGemsRepository()
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.gradle.api.tasks.LocalState
|
|||
import org.gradle.api.tasks.TaskContainer
|
||||
import org.gradle.process.JavaExecSpec
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.ysb33r.grolifant.api.core.OperatingSystem
|
||||
import org.ysb33r.grolifant.api.core.ProjectOperations
|
||||
|
||||
import java.util.concurrent.Callable
|
||||
|
@ -106,6 +107,9 @@ class JRubyExec extends JavaExec implements JRubyAwareTask, JRubyExecSpec {
|
|||
}.curry(jruby, tasks) as Callable<File>
|
||||
|
||||
this.gemWorkDir = project.provider(resolveGemWorkDir)
|
||||
if (OperatingSystem.current().windows) {
|
||||
systemProperty('jdk.io.File.enableADS', 'true')
|
||||
}
|
||||
}
|
||||
|
||||
/** Script to execute.
|
||||
|
|
|
@ -61,7 +61,7 @@ import static org.ysb33r.grolifant.api.v4.StringUtils.stringize
|
|||
*/
|
||||
@CompileStatic
|
||||
class JRubyPluginExtension extends AbstractCombinedProjectTaskExtension {
|
||||
public static final String DEFAULT_JRUBY_VERSION = '9.2.9.0'
|
||||
public static final String DEFAULT_JRUBY_VERSION = '9.3.4.0'
|
||||
|
||||
public static final String NAME = 'jruby'
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ class IvyXmlProxyServerIntegrationSpec extends Specification {
|
|||
build()
|
||||
|
||||
then:
|
||||
findFiles ~/^jaro_winkler-1.5.\d+-java.gem$/
|
||||
findFiles ~/^jaro_winkler-1\.5\.\d+-java\.gem$/
|
||||
}
|
||||
|
||||
private List<File> findFiles(Pattern pat) {
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
package com.github.jrubygradle.api.gems
|
||||
|
||||
import groovy.transform.CompileDynamic
|
||||
import groovy.transform.CompileStatic
|
||||
import groovy.util.logging.Slf4j
|
||||
import org.gradle.api.Action
|
||||
|
@ -33,6 +34,7 @@ import org.gradle.api.file.CopySpec
|
|||
import org.gradle.api.file.DuplicateFileCopyingException
|
||||
import org.gradle.api.file.FileCollection
|
||||
import org.gradle.process.JavaExecSpec
|
||||
import org.ysb33r.grolifant.api.core.LegacyLevel
|
||||
import org.ysb33r.grolifant.api.core.OperatingSystem
|
||||
import org.ysb33r.grolifant.api.core.ProjectOperations
|
||||
|
||||
|
@ -136,6 +138,7 @@ class GemUtils {
|
|||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
@SuppressWarnings('DuplicateStringLiteral')
|
||||
static void extractGems(
|
||||
ProjectOperations project,
|
||||
File jRubyClasspath,
|
||||
|
@ -178,6 +181,7 @@ class GemUtils {
|
|||
log.info("Installing ${gemsToProcess*.name.join(',')}")
|
||||
|
||||
project.javaexec { JavaExecSpec spec ->
|
||||
applyMainClassName(spec, JRUBY_MAINCLASS)
|
||||
spec.with {
|
||||
// Setting these environment variables will ensure that
|
||||
// jbundler and/or jar-dependencies will not attempt to invoke
|
||||
|
@ -187,23 +191,26 @@ class GemUtils {
|
|||
JARS_SKIP: true,
|
||||
GEM_HOME: destDir.absolutePath,
|
||||
GEM_PATH: destDir.absolutePath
|
||||
main = JRUBY_MAINCLASS
|
||||
classpath jRubyClasspath
|
||||
args '-S', GEM, 'install'
|
||||
|
||||
if (OperatingSystem.current().windows) {
|
||||
systemProperty('jdk.io.File.enableADS', 'true')
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: gemsToProcess is assumed to typically be sourced from
|
||||
* a FileCollection generated elsewhere in the code. The
|
||||
* FileCollection a flattened version of the dependency tree.
|
||||
*
|
||||
* In order to handle Rubygems which depend on their
|
||||
* dependencies at _installation time_, we need to reverse the
|
||||
* order to make sure that the .gem files for the
|
||||
* transitive/nested dependencies are installed first
|
||||
*
|
||||
* See:
|
||||
* https://gikhub.com/jruby-gradle/jruby-gradle-plugin/issues/341
|
||||
*/
|
||||
* NOTE: gemsToProcess is assumed to typically be sourced from
|
||||
* a FileCollection generated elsewhere in the code. The
|
||||
* FileCollection a flattened version of the dependency tree.
|
||||
*
|
||||
* In order to handle Rubygems which depend on their
|
||||
* dependencies at _installation time_, we need to reverse the
|
||||
* order to make sure that the .gem files for the
|
||||
* transitive/nested dependencies are installed first
|
||||
*
|
||||
* See:
|
||||
* https://github.com/jruby-gradle/jruby-gradle-plugin/issues/341
|
||||
*/
|
||||
gemsToProcess.toList().reverse().each { File gem ->
|
||||
args gem
|
||||
}
|
||||
|
@ -467,6 +474,15 @@ class GemUtils {
|
|||
}
|
||||
}
|
||||
|
||||
@CompileDynamic
|
||||
private static void applyMainClassName(JavaExecSpec spec, String mainClassName) {
|
||||
if (LegacyLevel.PRE_7_0) {
|
||||
spec.main = mainClassName
|
||||
} else {
|
||||
spec.mainClass = mainClassName
|
||||
}
|
||||
}
|
||||
|
||||
private static final String GEM = 'gem'
|
||||
private static final String GEM_EXTENSION = '.gem'
|
||||
private static final String EVERYTHING = '**'
|
||||
|
|
|
@ -14,8 +14,8 @@ releaseBuild=false
|
|||
targetCompatibility=1.8
|
||||
sourceCompatibility=1.8
|
||||
|
||||
grolifantVersion=1.0.0-alpha.6
|
||||
jrubyVersion=9.2.9.0
|
||||
grolifantVersion=1.3.3
|
||||
jrubyVersion=9.3.4.0
|
||||
jettyVersion=9.2.12.v20150709
|
||||
bcprovVersion=1.46
|
||||
httpbuilderNgVersion=1.0.3
|
||||
|
|
Loading…
Reference in New Issue