Compare commits

...

14 Commits

Author SHA1 Message Date
Schalk W. Cronjé 33e844221f
Merge pull request #434 from jruby-gradle/master
Release 2.1.0-alpha.3
2022-05-18 19:53:40 +02:00
Schalk W. Cronjé 4213f06c8f Run windows tests with --info 2022-05-18 17:37:53 +02:00
Schalk W. Cronjé 3f20cc61fc cleanup integration tests 2022-05-16 21:01:47 +02:00
Schalk W. Cronjé 44a3021a0b (#433) Workaround windows ADS problem on JRubyPrepare 2022-05-16 19:24:22 +02:00
Schalk W. Cronjé c9d94bc3ce Fix codenarc 2022-05-16 19:15:29 +02:00
Schalk W. Cronjé 9161a4354d Use main/mainClass depending on Gradle version 2022-05-16 19:04:47 +02:00
Schalk Cronje 0809b043ea Workaround plugin portal issue. Point to repo and not website 2022-05-16 14:00:01 +02:00
Schalk Cronje e697aeaec7 Use secrets inline in gradle arguments 2022-05-16 14:00:01 +02:00
Schalk Cronje 0b92bdbf36 debug: Checking use of secrets 2022-05-16 14:00:01 +02:00
Schalk Cronje e018475ecc debug: checking whether secrets are passed to Gradle correctly 2022-05-16 14:00:01 +02:00
Schalk W. Cronjé d340e6c6a7 only set pluginBundle for plugin subprojects 2022-05-16 14:00:01 +02:00
Schalk W. Cronjé 6a089a5ccc Describe plugin bundle #386 2022-05-16 14:00:01 +02:00
Christian Meier db46fa9281
Merge pull request #428 from donv/patch-1
Use new `mainClass` property instead of `main`
2022-05-06 11:48:26 +02:00
Uwe Kubosch 53d6452739
Use new `mainClass` property instead of `main` 2021-09-01 13:08:27 +02:00
7 changed files with 41 additions and 19 deletions

View File

@ -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

View File

@ -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()

View File

@ -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.

View File

@ -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'

View File

@ -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) {

View File

@ -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 = '**'

View File

@ -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