Learn the Gradle Build Script Basics in 12 Minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024

ความคิดเห็น • 9

  • @kelvinlow3517
    @kelvinlow3517 2 ปีที่แล้ว

    I would like to clarify on 10:01, this closure
    test {
    useJunitPlatform()
    }
    is configuring a task or plugin?
    How do we know a closure is configuring a task or plugin?

    • @TomGregoryTech
      @TomGregoryTech  2 ปีที่แล้ว +8

      Hi Kelvin. That closure is configuring the "test" task.
      With this syntax, there's no easy way to know if you're configuring a task or plugin. Try listing all the tasks with "./gradlew tasks --all".
      Another option is to use this more sophisticated & explicit syntax:
      tasks.named('test').configure {
      useJUnitPlatform()
      }

    • @kelvinlow3517
      @kelvinlow3517 2 ปีที่แล้ว

      @@TomGregoryTech thanks for clarifying

  • @bradleyturek
    @bradleyturek 2 ปีที่แล้ว +1

    Thanks for the video! I could be wrong about this, but I think the manifest issue will sort itself if you just tell the application plugin which is the main class, like this:
    application {
    mainClass = 'org.gradle.sample.Main'
    }

    • @TomGregoryTech
      @TomGregoryTech  2 ปีที่แล้ว

      Yep! You're absolutely right about that, Bradley.

  • @s-w
    @s-w ปีที่แล้ว

    Have you tried kotlin for the fun of it?

    • @TomGregoryTech
      @TomGregoryTech  ปีที่แล้ว

      Yes I tried it. Only for Gradle though. I have some videos & a Gradle course using Kotlin. Do you use it?

    • @s-w
      @s-w ปีที่แล้ว

      @@TomGregoryTech Yea, I'm an android developer so it's useful for me. I started with Java then went to kotlin and to me it's so much easier to use. When I have time, I'll go through some more of your videos, they'll definitely be useful for me!

  • @dennisfrye8240
    @dennisfrye8240 2 ปีที่แล้ว

    😻 ρяσмσѕм