File tree Expand file tree Collapse file tree 6 files changed +28
-6
lines changed
integTest/groovy/com/github/jrubygradle/api/core
main/groovy/com/github/jrubygradle/internal Expand file tree Collapse file tree 6 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -107,10 +107,8 @@ subprojects {
107
107
ideReport. enabled = true
108
108
ideReport. destination = file( " ${ project.codenarc.reportsDir} /${ reportName} .ide.txt" )
109
109
}
110
-
111
110
}
112
111
113
-
114
112
idea {
115
113
module {
116
114
downloadJavadoc = true
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ bintray {
36
36
vcsTag = " v${ project.version} "
37
37
attributes = [' gradle-plugin' : ' com.github.jruby-gradle.core:com.github.jruby-gradle:jruby-gradle-core-plugin' ]
38
38
desc = ' This plugin provides some core dependency resolution for JRuby/Gradle'
39
-
40
39
}
41
40
}
42
41
}
Original file line number Diff line number Diff line change @@ -208,6 +208,21 @@ class IvyXmlProxyServerIntegrationSpec extends Specification {
208
208
findFiles ~/ ^bibtex-ruby-4.4.7.gem$/
209
209
}
210
210
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
+
211
226
private List<File > findFiles (Pattern pat ) {
212
227
new File (projectDir, ' build/something' ). listFiles(new FilenameFilter () {
213
228
@Override
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import groovyx.net.http.HttpBuilder
34
34
import groovyx.net.http.HttpException
35
35
import okhttp3.OkHttpClient
36
36
37
+ import static com.github.jrubygradle.internal.gems.GemToIvy.JAVA_PLATFORM
37
38
import static groovyx.net.http.ContentTypes.JSON
38
39
import static groovyx.net.http.NativeHandlers.Parsers.json
39
40
import static groovyx.net.http.OkHttpBuilder.configure
@@ -171,8 +172,16 @@ class DefaultRubyGemRestApi implements com.github.jrubygradle.api.core.RubyGemQu
171
172
// licenses arrayList
172
173
)
173
174
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
+
174
183
if (jsonParser. dependencies?. runtime) {
175
- metadata. dependencies. addAll( Transform . toList(jsonParser. dependencies. runtime) {
184
+ metadata. dependencies. addAll(Transform . toList(jsonParser. dependencies. runtime) {
176
185
new DefaultGemDependency (name : it. name, requirements : it. requirements)
177
186
})
178
187
}
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ import static com.github.jrubygradle.api.gems.GemVersion.singleGemVersionFromMul
41
41
@CompileStatic
42
42
class GemToIvy {
43
43
44
+ public static final String JAVA_PLATFORM = ' java'
45
+
44
46
/* * Create a converter from GEM metadata to Ivy metadata.
45
47
*
46
48
* This constructor version assumes that the group is called {@code rubygems}.
@@ -156,7 +158,6 @@ class GemToIvy {
156
158
shaFile
157
159
}
158
160
159
- private static final String JAVA_PLATFORM = ' java'
160
161
private final String serverUri
161
162
private final String org = ' rubygems'
162
163
}
Original file line number Diff line number Diff line change 1
- version =2.0.0-alpha2
1
+ version =2.0.0-alpha.3
2
2
group =com.github.jruby-gradle
3
3
copyrightYear =2014-2019
4
4
You can’t perform that action at this time.
0 commit comments