commit
d8f1358065
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -107,10 +107,8 @@ subprojects {
|
|||
ideReport.enabled = true
|
||||
ideReport.destination = file( "${project.codenarc.reportsDir}/${reportName}.ide.txt")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
idea {
|
||||
module {
|
||||
downloadJavadoc = true
|
||||
|
|
|
@ -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'
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version=2.0.0-alpha2
|
||||
version=2.0.0-alpha.3
|
||||
group=com.github.jruby-gradle
|
||||
copyrightYear=2014-2019
|
||||
|
||||
|
|
Loading…
Reference in New Issue