Skip to content

Commit d8f1358

Browse files
authored
Merge pull request #392 from ysb33r/master
Release 2.0.0-alpha.3
2 parents 44c14bb + ac7db6f commit d8f1358

File tree

8 files changed

+31
-8
lines changed

8 files changed

+31
-8
lines changed

base-plugin/src/main/groovy/com/github/jrubygradle/JRubyExec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class JRubyExec extends JavaExec implements JRubyAwareTask, JRubyExecSpec {
189189
*/
190190
@Deprecated
191191
String getJrubyVersion() {
192-
deprecated('Use jruby.getJrubyVersion rather getJrubyVersion()')
192+
deprecated('Use jruby.getJrubyVersion() rather getJrubyVersion()')
193193
jruby.jrubyVersion
194194
}
195195

base-plugin/src/main/groovy/com/github/jrubygradle/JRubyPluginExtension.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class JRubyPluginExtension extends AbstractCombinedProjectTaskExtension {
6060
*/
6161
JRubyPluginExtension(Project p) {
6262
super(p)
63+
this.jrubyVersion = DEFAULT_JRUBY_VERSION
6364
}
6465

6566
/** Task extension constructor
@@ -322,7 +323,7 @@ class JRubyPluginExtension extends AbstractCombinedProjectTaskExtension {
322323
}
323324

324325
private static final String JRUBY_COMPLETE_DEPENDENCY = 'org.jruby:jruby-complete'
325-
private Object jrubyVersion = DEFAULT_JRUBY_VERSION
326+
private Object jrubyVersion
326327

327328
private Provider<Configuration> gemConfiguration
328329
private String gemPrepareTaskName

build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,8 @@ subprojects {
107107
ideReport.enabled = true
108108
ideReport.destination = file( "${project.codenarc.reportsDir}/${reportName}.ide.txt")
109109
}
110-
111110
}
112111

113-
114112
idea {
115113
module {
116114
downloadJavadoc = true

core-plugin/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ bintray {
3636
vcsTag = "v${project.version}"
3737
attributes = ['gradle-plugin': 'com.github.jruby-gradle.core:com.github.jruby-gradle:jruby-gradle-core-plugin']
3838
desc = 'This plugin provides some core dependency resolution for JRuby/Gradle'
39-
4039
}
4140
}
4241
}

core-plugin/src/integTest/groovy/com/github/jrubygradle/api/core/IvyXmlProxyServerIntegrationSpec.groovy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,21 @@ class IvyXmlProxyServerIntegrationSpec extends Specification {
208208
findFiles ~/^bibtex-ruby-4.4.7.gem$/
209209
}
210210

211+
void 'Resolve a transitive dependency which is jruby-specific'() {
212+
setup:
213+
withBuildFile '''
214+
dependencies {
215+
something 'rubygems:rubocop:0.77.0'
216+
}
217+
'''
218+
219+
when:
220+
build()
221+
222+
then:
223+
findFiles ~/^jaro_winkler-1.5.\d+-java.gem$/
224+
}
225+
211226
private List<File> findFiles(Pattern pat) {
212227
new File(projectDir, 'build/something').listFiles(new FilenameFilter() {
213228
@Override

core-plugin/src/main/groovy/com/github/jrubygradle/internal/core/DefaultRubyGemRestApi.groovy

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import groovyx.net.http.HttpBuilder
3434
import groovyx.net.http.HttpException
3535
import okhttp3.OkHttpClient
3636

37+
import static com.github.jrubygradle.internal.gems.GemToIvy.JAVA_PLATFORM
3738
import static groovyx.net.http.ContentTypes.JSON
3839
import static groovyx.net.http.NativeHandlers.Parsers.json
3940
import static groovyx.net.http.OkHttpBuilder.configure
@@ -171,8 +172,16 @@ class DefaultRubyGemRestApi implements com.github.jrubygradle.api.core.RubyGemQu
171172
// licenses arrayList
172173
)
173174

175+
if (metadata.platform != JAVA_PLATFORM) {
176+
if (getData(V1, "versions/${metadata.name}").find {
177+
it.number == metadata.version && it.platform == JAVA_PLATFORM
178+
}) {
179+
metadata.platform = JAVA_PLATFORM
180+
}
181+
}
182+
174183
if (jsonParser.dependencies?.runtime) {
175-
metadata.dependencies.addAll( Transform.toList(jsonParser.dependencies.runtime) {
184+
metadata.dependencies.addAll(Transform.toList(jsonParser.dependencies.runtime) {
176185
new DefaultGemDependency(name: it.name, requirements: it.requirements)
177186
})
178187
}

core-plugin/src/main/groovy/com/github/jrubygradle/internal/gems/GemToIvy.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ import static com.github.jrubygradle.api.gems.GemVersion.singleGemVersionFromMul
4141
@CompileStatic
4242
class GemToIvy {
4343

44+
public static final String JAVA_PLATFORM = 'java'
45+
4446
/** Create a converter from GEM metadata to Ivy metadata.
4547
*
4648
* This constructor version assumes that the group is called {@code rubygems}.
@@ -156,7 +158,6 @@ class GemToIvy {
156158
shaFile
157159
}
158160

159-
private static final String JAVA_PLATFORM = 'java'
160161
private final String serverUri
161162
private final String org = 'rubygems'
162163
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=2.0.0-alpha2
1+
version=2.0.0-alpha.3
22
group=com.github.jruby-gradle
33
copyrightYear=2014-2019
44

0 commit comments

Comments
 (0)