You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/02/18 02:23:05 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #14002: [BEAM-11589] Migrated vendor/bytebuddy build.gradle file to Kotlin script

TheNeuralBit commented on a change in pull request #14002:
URL: https://github.com/apache/beam/pull/14002#discussion_r578080348



##########
File path: vendor/bytebuddy-1_10_8/build.gradle.kts
##########
@@ -16,22 +16,25 @@
  * limitations under the License.
  */
 
-plugins { id 'org.apache.beam.vendor-java' }
+plugins { id("org.apache.beam.vendor-java") }
 
 description = "Apache Beam :: Vendored Dependencies :: ByteBuddy :: 1.10.8"
 
 group = "org.apache.beam"
 version = "0.1"
 
+val vendorJava = project.extensions.extraProperties.get("vendorJava") as groovy.lang.Closure<*>
 vendorJava(
-  dependencies: ["net.bytebuddy:byte-buddy:1.10.8"],
-  relocations: [
-    "net.bytebuddy": "org.apache.beam.vendor.bytebuddy.v1_10_8.net.bytebuddy"
-  ],
-  exclusions: [
+        mapOf(
+
+  "dependencies" to listOf("net.bytebuddy:byte-buddy:1.10.8"),
+  "relocations" to mapOf(
+                "net.bytebuddy" to "org.apache.beam.vendor.bytebuddy.v1_10_8.net.bytebuddy"),
+  "exclusions" to listOf(
     "**/module-info.class"
-  ],
-  groupId: group,
-  artifactId: "beam-vendor-bytebuddy-1_10_8",
-  version: version
+  ),
+  "groupId" to group,
+  "artifactId" to "beam-vendor-bytebuddy-1_10_8",
+  "version" to version
+)

Review comment:
       nit: the formatting here is a little weird.
   
   It might be worth looking into auto-formatting these files with the spotless plugin (i.e. so that `./gradlew spotlessApply` will format them)
   
   I think it should be like
   ```
   vendorJava(
     mapOf(
       "dependencies" to ..
       ....
     )
   )




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org