Merge pull request #392 from ysb33r/master

Release 2.0.0-alpha.3
This commit is contained in:
Schalk W. Cronjé 2019-12-20 18:22:21 +01:00 committed by GitHub
commit d8f1358065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 31 additions and 8 deletions

View File

@ -189,7 +189,7 @@ class JRubyExec extends JavaExec implements JRubyAwareTask, JRubyExecSpec {
*/
@Deprecated
String getJrubyVersion() {
deprecated('Use jruby.getJrubyVersion rather getJrubyVersion()')
deprecated('Use jruby.getJrubyVersion() rather getJrubyVersion()')
jruby.jrubyVersion
}

View File

@ -60,6 +60,7 @@ class JRubyPluginExtension extends AbstractCombinedProjectTaskExtension {
*/
JRubyPluginExtension(Project p) {
super(p)
this.jrubyVersion = DEFAULT_JRUBY_VERSION
}
/** Task extension constructor
@ -322,7 +323,7 @@ class JRubyPluginExtension extends AbstractCombinedProjectTaskExtension {
}
private static final String JRUBY_COMPLETE_DEPENDENCY = 'org.jruby:jruby-complete'
private Object jrubyVersion = DEFAULT_JRUBY_VERSION
private Object jrubyVersion
private Provider<Configuration> gemConfiguration
private String gemPrepareTaskName

View File

@ -107,10 +107,8 @@ subprojects {
ideReport.enabled = true
ideReport.destination = file( "${project.codenarc.reportsDir}/${reportName}.ide.txt")
}
}
idea {
module {
downloadJavadoc = true

View File

@ -36,7 +36,6 @@ bintray {
vcsTag = "v${project.version}"
attributes = ['gradle-plugin': 'com.github.jruby-gradle.core:com.github.jruby-gradle:jruby-gradle-core-plugin']
desc = 'This plugin provides some core dependency resolution for JRuby/Gradle'
}
}
}

View File

@ -208,6 +208,21 @@ class IvyXmlProxyServerIntegrationSpec extends Specification {
findFiles ~/^bibtex-ruby-4.4.7.gem$/
}
void 'Resolve a transitive dependency which is jruby-specific'() {
setup:
withBuildFile '''
dependencies {
something 'rubygems:rubocop:0.77.0'
}
'''
when:
build()
then:
findFiles ~/^jaro_winkler-1.5.\d+-java.gem$/
}
private List<File> findFiles(Pattern pat) {
new File(projectDir, 'build/something').listFiles(new FilenameFilter() {
@Override

View File

@ -34,6 +34,7 @@ import groovyx.net.http.HttpBuilder
import groovyx.net.http.HttpException
import okhttp3.OkHttpClient
import static com.github.jrubygradle.internal.gems.GemToIvy.JAVA_PLATFORM
import static groovyx.net.http.ContentTypes.JSON
import static groovyx.net.http.NativeHandlers.Parsers.json
import static groovyx.net.http.OkHttpBuilder.configure
@ -171,8 +172,16 @@ class DefaultRubyGemRestApi implements com.github.jrubygradle.api.core.RubyGemQu
// licenses arrayList
)
if (metadata.platform != JAVA_PLATFORM) {
if (getData(V1, "versions/${metadata.name}").find {
it.number == metadata.version && it.platform == JAVA_PLATFORM
}) {
metadata.platform = JAVA_PLATFORM
}
}
if (jsonParser.dependencies?.runtime) {
metadata.dependencies.addAll( Transform.toList(jsonParser.dependencies.runtime) {
metadata.dependencies.addAll(Transform.toList(jsonParser.dependencies.runtime) {
new DefaultGemDependency(name: it.name, requirements: it.requirements)
})
}

View File

@ -41,6 +41,8 @@ import static com.github.jrubygradle.api.gems.GemVersion.singleGemVersionFromMul
@CompileStatic
class GemToIvy {
public static final String JAVA_PLATFORM = 'java'
/** Create a converter from GEM metadata to Ivy metadata.
*
* This constructor version assumes that the group is called {@code rubygems}.
@ -156,7 +158,6 @@ class GemToIvy {
shaFile
}
private static final String JAVA_PLATFORM = 'java'
private final String serverUri
private final String org = 'rubygems'
}

View File

@ -1,4 +1,4 @@
version=2.0.0-alpha2
version=2.0.0-alpha.3
group=com.github.jruby-gradle
copyrightYear=2014-2019