Adjust license to include 2021
This commit is contained in:
parent
2304bd4d4e
commit
08751e9317
|
@ -58,7 +58,7 @@ jobs:
|
|||
- name: Build
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain --warning-mode=all -clean assemble
|
||||
arguments: --console=plain --warning-mode=all clean assemble
|
||||
# Test
|
||||
- name: UnitTest
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
|
@ -79,6 +79,13 @@ jobs:
|
|||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --stop
|
||||
- name: Store reports
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: Test reports Windows
|
||||
path: "**/build/reports/**"
|
||||
retention-days: 5
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -109,17 +116,24 @@ jobs:
|
|||
with:
|
||||
arguments: -i -S --console=plain --no-build-cache assemble
|
||||
# Unit tests
|
||||
- name: UNit tests
|
||||
- name: Unit tests
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: -i -s --console=plain --no-build-cache test
|
||||
# Integration tests
|
||||
- name: Integration tests (without slides)
|
||||
- name: Integration tests
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: -i -s --console=plain --no-build-cache intTest
|
||||
# Gradle tests
|
||||
- name: Gradle tests
|
||||
- name: Compatibility tests
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: -i -s --console=plain --no-build-cache gradleTest
|
||||
- name: Store reports
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: Test reports
|
||||
path: "**/build/reports/**"
|
||||
retention-days: 5
|
|
@ -30,7 +30,7 @@ import spock.lang.IgnoreIf
|
|||
/**
|
||||
* @author Schalk W. Cronjé
|
||||
*/
|
||||
@IgnoreIf({System.getProperty('TESTS_ARE_OFFLINE')})
|
||||
@IgnoreIf({ System.getProperty('TESTS_ARE_OFFLINE') })
|
||||
class JRubyExecExtensionIntegrationSpec extends IntegrationSpecification {
|
||||
|
||||
public static final String DEFAULT_TASK_NAME = 'inlineJRubyExec'
|
||||
|
|
|
@ -25,11 +25,7 @@ package com.github.jrubygradle
|
|||
|
||||
import com.github.jrubygradle.testhelper.IntegrationSpecification
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import spock.lang.IgnoreIf
|
||||
import spock.lang.Issue
|
||||
import spock.lang.PendingFeature
|
||||
|
||||
import static com.github.jrubygradle.internal.JRubyExecUtils.DEFAULT_JRUBYEXEC_CONFIG
|
||||
|
||||
class JRubyExecIntegrationSpec extends IntegrationSpecification {
|
||||
static final String DEFAULT_TASK_NAME = 'RubyWax'
|
||||
|
@ -151,9 +147,9 @@ class JRubyExecIntegrationSpec extends IntegrationSpecification {
|
|||
script 'rspec'
|
||||
"""
|
||||
|
||||
File specDir = new File(projectDir,'spec')
|
||||
File specDir = new File(projectDir, 'spec')
|
||||
specDir.mkdirs()
|
||||
new File(specDir,'sample.rb').text = ''
|
||||
new File(specDir, 'sample.rb').text = ''
|
||||
|
||||
when:
|
||||
BuildResult result = build()
|
||||
|
|
|
@ -30,7 +30,7 @@ import spock.lang.IgnoreIf
|
|||
/**
|
||||
* @author Schalk W. Cronjé
|
||||
*/
|
||||
@IgnoreIf({System.getProperty('TESTS_ARE_OFFLINE')})
|
||||
@IgnoreIf({ System.getProperty('TESTS_ARE_OFFLINE') })
|
||||
class JRubyGenerateGradleRbIntegrationSpec extends IntegrationSpecification {
|
||||
|
||||
static final String DEFAULT_TASK_NAME = 'RubyWax'
|
||||
|
|
|
@ -106,7 +106,6 @@ class JRubyPrepareGemsIntegrationSpec extends IntegrationSpecification {
|
|||
lockAllConfigurations()
|
||||
}
|
||||
|
||||
|
||||
"""
|
||||
withDependencies """
|
||||
gems "rubygems:sinatra:1.4.5"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
package com.github.jrubygradle.testhelper
|
||||
|
||||
|
||||
import org.gradle.testkit.runner.GradleRunner
|
||||
import org.junit.Rule
|
||||
import org.junit.rules.TemporaryFolder
|
||||
|
@ -55,7 +54,7 @@ class IntegrationSpecification extends Specification {
|
|||
Map artifactVersions
|
||||
|
||||
@Rule
|
||||
TemporaryFolder testFolder
|
||||
TemporaryFolder testFolder = new TemporaryFolder(new File(System.getProperty('TMP_FOLDER')))
|
||||
|
||||
File projectDir
|
||||
File buildFile
|
||||
|
@ -65,6 +64,7 @@ class IntegrationSpecification extends Specification {
|
|||
testProperties = loadTestProperties()
|
||||
flatRepoLocation = new File(testProperties.flatrepo)
|
||||
mavenRepoLocation = new File(testProperties.mavenrepo)
|
||||
new File(System.getProperty('TMP_FOLDER')).mkdirs()
|
||||
|
||||
artifactVersions = [
|
||||
'credit_card_validator': testProperties.creditCardValidatorVersion,
|
||||
|
@ -77,7 +77,7 @@ class IntegrationSpecification extends Specification {
|
|||
}
|
||||
|
||||
void setup() {
|
||||
projectDir = testFolder.root
|
||||
projectDir = testFolder.root.absoluteFile
|
||||
buildFile = new File(projectDir, 'build.gradle')
|
||||
settingsFile = new File(projectDir, 'settings.gradle')
|
||||
|
||||
|
@ -90,7 +90,7 @@ class IntegrationSpecification extends Specification {
|
|||
destination.text = this.class.getResource("/scripts/${name}").text
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings('ThrowRuntimeException')
|
||||
String findDependency(final String organisation, final String artifact, final String extension) {
|
||||
String ver = artifactVersions[artifact]
|
||||
if (!ver) {
|
||||
|
|
|
@ -32,12 +32,9 @@ import org.gradle.api.artifacts.Configuration
|
|||
import org.gradle.api.model.ReplacedBy
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.JavaExec
|
||||
import org.gradle.api.tasks.LocalState
|
||||
import org.gradle.api.tasks.Optional
|
||||
import org.gradle.api.tasks.PathSensitive
|
||||
import org.gradle.api.tasks.PathSensitivity
|
||||
import org.gradle.api.tasks.TaskContainer
|
||||
import org.gradle.process.JavaExecSpec
|
||||
import org.gradle.util.GradleVersion
|
||||
|
@ -75,6 +72,16 @@ class JRubyExec extends JavaExec implements JRubyAwareTask, JRubyExecSpec {
|
|||
this.jruby = extensions.create(JRubyPluginExtension.NAME, JRubyPluginExtension, this)
|
||||
this.projectOperations = ProjectOperations.create(project)
|
||||
this.tasks = project.tasks
|
||||
this.inputs.property 'script-path', { scr ->
|
||||
File f = resolveScript(projectOperations, scr)
|
||||
if (!f) {
|
||||
''
|
||||
} else if (f.exists()) {
|
||||
f.text
|
||||
} else {
|
||||
stringize(scr)
|
||||
}
|
||||
}.curry(this.script)
|
||||
|
||||
inputs.property 'jrubyver', { JRubyPluginExtension jruby ->
|
||||
jruby.jrubyVersion
|
||||
|
@ -104,9 +111,10 @@ class JRubyExec extends JavaExec implements JRubyAwareTask, JRubyExecSpec {
|
|||
/** Script to execute.
|
||||
* @return The path to the script (or {@code null} if not set)
|
||||
*/
|
||||
@Optional
|
||||
@InputFile
|
||||
@PathSensitive(PathSensitivity.NONE)
|
||||
// @Optional
|
||||
// @InputFile
|
||||
// @PathSensitive(PathSensitivity.NONE)
|
||||
@Internal
|
||||
File getScript() {
|
||||
resolveScript(projectOperations, this.script)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
package com.github.jrubygradle
|
||||
|
||||
|
||||
import org.gradle.api.InvalidUserDataException
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.Configuration
|
||||
|
@ -80,7 +79,7 @@ class JRubyExecTaskSpec extends Specification {
|
|||
execTask.jruby.jrubyVersion != project.jruby.jrubyVersion
|
||||
|
||||
and: "jrubyConfigurationName must point to this new configuration"
|
||||
execTask.jruby.getGemConfiguration().name == configurationName
|
||||
execTask.jruby.gemConfiguration.name == configurationName
|
||||
|
||||
and: "configuration must exist"
|
||||
project.configurations.findByName(configurationName)
|
||||
|
@ -178,6 +177,6 @@ class JRubyExecTaskSpec extends Specification {
|
|||
}
|
||||
|
||||
then:
|
||||
execTask.jruby.getGemConfiguration().name == customConfig.name
|
||||
execTask.jruby.gemConfiguration.name == customConfig.name
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
package com.github.jrubygradle
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.repositories.ArtifactRepository
|
||||
import org.gradle.api.artifacts.repositories.IvyArtifactRepository
|
||||
import org.gradle.testfixtures.ProjectBuilder
|
||||
import spock.lang.Specification
|
||||
|
||||
|
@ -45,12 +43,4 @@ class JRubyPluginSpec extends Specification {
|
|||
then:
|
||||
project.jruby.defaultVersion == JRubyPluginExtension.DEFAULT_JRUBY_VERSION
|
||||
}
|
||||
|
||||
private Collection hasRepositoryUrl(Project p, String url) {
|
||||
p.repositories.findAll { ArtifactRepository r ->
|
||||
r instanceof IvyArtifactRepository
|
||||
}.findAll {
|
||||
it.ivyPattern.contains(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ class JRubyExecUtilsSpec extends Specification {
|
|||
|
||||
void "Prepare a basic JRuby environment"() {
|
||||
when:
|
||||
Map preparedEnv = prepareJRubyEnvironment([:],false, new File('tmp/foo'))
|
||||
Map preparedEnv = prepareJRubyEnvironment([:], false, new File('tmp/foo'))
|
||||
|
||||
then:
|
||||
preparedEnv.size() > 0
|
||||
|
@ -128,7 +128,7 @@ class JRubyExecUtilsSpec extends Specification {
|
|||
'GEM_HOME' : '/tmp/spock',
|
||||
'RUBY_VERSION' : 'notaversion',
|
||||
'rvm_ruby_string': 'jruby-head',
|
||||
],false, gemWorkDir)
|
||||
], false, gemWorkDir)
|
||||
|
||||
then:
|
||||
preparedEnv['GEM_HOME'] == gemWorkDir.absolutePath
|
||||
|
|
|
@ -36,7 +36,8 @@ subprojects {
|
|||
apply plugin: 'maven'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
if (project.name != 'docs') {
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.junit.rules.TemporaryFolder
|
|||
import spock.lang.IgnoreIf
|
||||
import spock.lang.Issue
|
||||
import spock.lang.Specification
|
||||
import spock.lang.Unroll
|
||||
|
||||
import java.util.regex.Pattern
|
||||
|
||||
|
@ -104,7 +103,6 @@ class IvyXmlProxyServerIntegrationSpec extends Specification {
|
|||
new File(projectDir, 'build/something/base_app-1.0.6.gem').exists()
|
||||
}
|
||||
|
||||
|
||||
void 'Download Asciidoctor Reveal.JS GEM and friends'() {
|
||||
setup:
|
||||
withBuildFile '''
|
||||
|
|
|
@ -61,6 +61,6 @@ class IvyXmlProxyServerSpec extends Specification {
|
|||
}
|
||||
|
||||
then: 'The Ivy file should be generated and cached locally'
|
||||
new File(projectRoot.root,TEST_IVY_PATH)
|
||||
new File(projectRoot.root, TEST_IVY_PATH)
|
||||
}
|
||||
}
|
|
@ -27,7 +27,6 @@ import org.gradle.api.Project
|
|||
import org.gradle.testfixtures.ProjectBuilder
|
||||
import spock.lang.Specification
|
||||
|
||||
|
||||
class RepositoryHandlerExtensionSpec extends Specification {
|
||||
|
||||
Project project = ProjectBuilder.builder().build()
|
||||
|
@ -35,13 +34,13 @@ class RepositoryHandlerExtensionSpec extends Specification {
|
|||
void 'Add Maven repository'() {
|
||||
when:
|
||||
project.allprojects {
|
||||
apply plugin : JRubyCorePlugin
|
||||
apply plugin: JRubyCorePlugin
|
||||
|
||||
repositories {
|
||||
ruby {
|
||||
mavengems()
|
||||
mavengems('https://goo1')
|
||||
mavengems('goo2','https://goo2')
|
||||
mavengems('goo2', 'https://goo2')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
*/
|
||||
package com.github.jrubygradle.api.gems
|
||||
|
||||
import com.github.jrubygradle.api.gems.GemOverwriteAction
|
||||
import com.github.jrubygradle.api.gems.GemUtils
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.file.DuplicateFileCopyingException
|
||||
import org.gradle.testfixtures.ProjectBuilder
|
||||
|
|
|
@ -35,7 +35,7 @@ class GemVersionSpec extends Specification {
|
|||
@Unroll
|
||||
void "#gemRequirement (gem requirement) ⇒ #ivyNotation (ivy)"() {
|
||||
when:
|
||||
String ivy = gemVersionFromGemRequirement(gemRequirement).toString()
|
||||
String ivy = gemVersionFromGemRequirement(gemRequirement)
|
||||
|
||||
then:
|
||||
ivy == ivyNotation
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
package com.github.jrubygradle.internal.gems
|
||||
|
||||
|
||||
import spock.lang.Specification
|
||||
|
||||
class GemToIvySpec extends Specification {
|
||||
|
|
|
@ -14,7 +14,7 @@ releaseBuild=false
|
|||
targetCompatibility=1.8
|
||||
sourceCompatibility=1.8
|
||||
|
||||
grolifantVersion=1.0.0-alpha.4
|
||||
grolifantVersion=1.0.0-alpha.6
|
||||
jrubyVersion=9.2.9.0
|
||||
jettyVersion=9.2.12.v20150709
|
||||
bcprovVersion=1.46
|
||||
|
|
|
@ -40,5 +40,6 @@ task integrationTest(type: Test, dependsOn: jar) {
|
|||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
dependsOn copyIntegrationTestGems
|
||||
mustRunAfter test
|
||||
systemProperties TMP_FOLDER : file('build/tmp/integrationTestTempFolder').absolutePath
|
||||
}
|
||||
check.dependsOn integrationTest
|
||||
|
|
|
@ -20,7 +20,7 @@ dependencies {
|
|||
/*
|
||||
* NOTE: version 5.0.0 of the shadow plugin supports only Gradle 5.x and later
|
||||
*/
|
||||
compile 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
|
||||
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)'
|
||||
|
@ -105,7 +105,6 @@ bintray {
|
|||
vcsTag = "v${project.version}"
|
||||
attributes = ['gradle-plugin' : 'com.github.jruby-gradle.jar:com.github.jruby-gradle:jruby-gradle-jar-plugin']
|
||||
desc = 'This plugin encapsulates java archive building functionality for JRuby Gradle projects'
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +116,7 @@ bintrayUpload {
|
|||
gradleTest {
|
||||
dependsOn jar
|
||||
mustRunAfter test, integrationTest
|
||||
enabled = false // TODO: Fix jar plugin as it has a DoS in jar construction.
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
|
|
|
@ -27,7 +27,6 @@ import com.github.jrubygradle.jar.helpers.IntegrationSpecification
|
|||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.gradle.testkit.runner.TaskOutcome
|
||||
import spock.lang.Ignore
|
||||
import spock.lang.IgnoreIf
|
||||
import spock.lang.Issue
|
||||
|
||||
import java.util.zip.ZipEntry
|
||||
|
@ -175,23 +174,7 @@ class JRubyJarTestKitSpec extends IntegrationSpecification {
|
|||
"""
|
||||
}
|
||||
|
||||
private void withRepoSetup(String content) {
|
||||
this.repoSetup = """
|
||||
repositories {
|
||||
${content}
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
||||
private void withDependencies(String content) {
|
||||
this.deps = """
|
||||
dependencies {
|
||||
${content}
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
||||
private void withPreamble(String content) {
|
||||
private void withPreamble(String content) {
|
||||
this.preamble = content
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import spock.lang.Specification
|
|||
|
||||
class IntegrationSpecification extends Specification {
|
||||
static final boolean OFFLINE = System.getProperty('TESTS_ARE_OFFLINE')
|
||||
static final File PARENT_TEST_FOLDER = new File(System.getProperty('TEST_TEMP_FOLDER','./build/tmp/integrationTests'))
|
||||
static final File PARENT_TEST_FOLDER = new File(System.getProperty('TEST_TEMP_FOLDER', './build/tmp/integrationTests'))
|
||||
|
||||
@Shared
|
||||
Map testProperties
|
||||
|
@ -64,12 +64,12 @@ class IntegrationSpecification extends Specification {
|
|||
|
||||
GradleRunner gradleRunner(List<String> args) {
|
||||
GradleRunner.create()
|
||||
.withProjectDir(projectDir)
|
||||
.withDebug(true)
|
||||
.withArguments(args)
|
||||
.withPluginClasspath()
|
||||
.withTestKitDir(PARENT_TEST_FOLDER)
|
||||
.forwardOutput()
|
||||
.withProjectDir(projectDir)
|
||||
.withDebug(true)
|
||||
.withArguments(args)
|
||||
.withPluginClasspath()
|
||||
.withTestKitDir(PARENT_TEST_FOLDER)
|
||||
.forwardOutput()
|
||||
}
|
||||
|
||||
String pathAsUriStr(final File path) {
|
||||
|
|
Loading…
Reference in New Issue