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