How to Migrate Gradle Groovy to Gradle Kotlin DSL in Android Studio

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 57

  • @nymexe
    @nymexe 2 года назад +17

    Pretty good 👍 You can remove the clean task completely now. Clean task automatically registered by default in Gradle.

  • @jmorasot
    @jmorasot Год назад +4

    I hate the issue of AS showing errors in kotlin dsl. Great video as always, I was expecting for this one since long time ago

  • @abrarwiryawan
    @abrarwiryawan Год назад +4

    Cool vid as always. I want to add that you dont need to use "old" style in project level build.gradle file. You can do this instead. The repository like google and maven exist in settings.gradle file.
    plugins {
    id("com.android.application") version "7.3.1" apply false
    id("com.android.library") version "7.3.1" apply false
    id("org.jetbrains.kotlin.android") version "1.7.20" apply false
    }
    tasks.create("clean") {
    delete(rootProject.buildDir)
    }

    • @98harshkhulwe43
      @98harshkhulwe43 8 месяцев назад

      but how can i add dependencies in project level gradle file. should i add it in top level build file or settings.gradle file

  • @LiranBarsisa
    @LiranBarsisa Год назад +5

    What's the benefit of this, and will there be a tool to help migrate?
    I think it might be hard in case of complex code there, no?

  • @Tuligarnio
    @Tuligarnio 2 года назад +7

    The Alt + J command would've been helpful when doing the migrations to select the next ocurrence of the selected text instead of using search and replace tool.

    • @AndroidDeveloperTips
      @AndroidDeveloperTips Год назад

      You can try find a pattern by including a space before or after the character you are using. Also alt click and adding multiple cursors at the end of the lines and the using hot keys like home/end or ctrl+right/left can help a lot navigating and selecting what you are trying to change much faster.

    • @ArthurKhazbs
      @ArthurKhazbs Год назад +3

      "Column selection mode" can be really useful too!

  • @syedovaiss
    @syedovaiss 2 года назад +2

    It's super cool we just migrated to DSL last month.

  • @azefacknopunkwegeorge3167
    @azefacknopunkwegeorge3167 Год назад +1

    Learned a new shortcut ctrl + R, helpful indeed, thanks!

  • @vengateshm2122
    @vengateshm2122 Год назад

    Pls add an video on version catalog as a continuation of this

  • @dawidd6356
    @dawidd6356 Год назад

    I have a great idea for a video, what about Trusted web activity for jetpack compose ?

  • @JustEntertain
    @JustEntertain Год назад

    Why i am not able to see any link related to this project on you description?? if anyone can able to see please share

  • @SadeghTahani
    @SadeghTahani Год назад +1

    Perfect as always!

  • @mircodev
    @mircodev Год назад +1

    Hopefully there will be a automatic migration some day.....

  • @hotohori666
    @hotohori666 Год назад

    The Safe Args plugin is incompatible with the Kotlin DSL. Is there any fix for this?

  • @amanverma6515
    @amanverma6515 Год назад

    I was just finding this yesterday, Thanks Sir

  • @ManuelNagler
    @ManuelNagler Год назад +1

    Could've used multi line edit for the dependencies. Much easier

  • @tonnie7079
    @tonnie7079 Год назад +1

    Kotlin DSL is fun, Thx Philip. How would ensure you put compose_ui_version in one place say at the project level?

  • @emmanuelmtera5936
    @emmanuelmtera5936 2 года назад +2

    Very informative 🎉

  • @loyisomtshali
    @loyisomtshali Год назад

    Great video Philipp. Was hoping you'd show the versions being defined in project level gradle being used in app level gradle.
    Is the syntax the same as Groovy?

    • @maskedredstonerproz
      @maskedredstonerproz Год назад

      no, and in gradle kotlin the versions are defined in the gradle.properties file, and acessed in whatever gradle file you need by writing val foo by project, which fetches the property of the same name from gradle.properties, source: ktor

    • @loyisomtshali
      @loyisomtshali Год назад

      @@maskedredstonerproz thank you.

  • @maximooze3196
    @maximooze3196 2 года назад

    oofff! there yah go boiz!! 🎉🎉

  • @CookingWithMasterChef
    @CookingWithMasterChef 2 года назад

    What you say about flutter ? future is kotlin android or flutter?

  • @Heineken774
    @Heineken774 2 года назад

    Thank you Philipp you helped me a lot

  • @prakashprakash-zd3om
    @prakashprakash-zd3om Год назад

    Hi Philipp
    Can you mention INR Amount for Android Multi-Module Architecture course

  • @dennisgithuku9340
    @dennisgithuku9340 2 года назад

    Superb explanation

  • @asadullahilyas
    @asadullahilyas Год назад

    Can't I use compose_ui_version variable with Kotlin Gradle files?

  • @moumnalmunawy1806
    @moumnalmunawy1806 2 года назад

    OK, now we need to talk about fastlane

  • @chitye-aung
    @chitye-aung Год назад

    Always Awesome

  • @Danilo-O
    @Danilo-O Год назад

    Imo you should avoid that sound effect when zooming in/out. I'd like to know what other people feel about that.

  • @yousefshaiban8973
    @yousefshaiban8973 2 года назад

    Thank you so much for this content

  • @argahutama
    @argahutama 2 года назад

    Amazing tutorial

  • @GeolseuDeiGamers
    @GeolseuDeiGamers 2 года назад +1

    May i know what is the purpose of migrating groovy to kotlin dsl?

    • @hemantmahawar8834
      @hemantmahawar8834 2 года назад +3

      As he mentioned for more familiarity with kotlin, it's syntax, type checking, error messages etc

    • @adeltarek2117
      @adeltarek2117 Год назад

      To ensure a streamlined approach in handling project dependencies, it is recommended to declare the dependencies along with their respective versions in a centralized source.
      This will enable their use in any module at a later stage while ensuring that all modules are compatible with the same version of dependencies. This method of organization can help maintain a structured and efficient workflow in project dependencies management.

  • @jackcsk
    @jackcsk Год назад

    For the search and replace, you can use the regex to solve the close quotation.
    Set the matching as regex:
    ("|')$

  • @tinykingcontractor1396
    @tinykingcontractor1396 2 года назад +1

    What about settings.gradle?

  • @taar1
    @taar1 10 месяцев назад

    Since changing to build.gradle.kts my Bitrise workflow fails because it cant find build.gradle anymore. No idea how to fix this, can anyone give me a hint?

  • @SpaceGuideHub
    @SpaceGuideHub Год назад

    Are you from Germany Philipp?

  • @nayeemdv
    @nayeemdv Год назад +1

    Hey Philipp, Can u Teach or Guide us how to solve the issues in Open Source Android Projects.
    Btw Thanks for The Awesome content I learned a lot from you❤❤❤

  • @theonline5703
    @theonline5703 Год назад

    let's go Australia

  • @pradyumnx
    @pradyumnx 2 года назад +1

    👍👍👍❤️❤️❤️

  • @Gabrielle4101
    @Gabrielle4101 Год назад

    There is a good tool for that called gradle-kotlinize

  • @Talaria.School
    @Talaria.School Год назад

    Thanks

  • @SanathSanathsajeevakumara
    @SanathSanathsajeevakumara Год назад

    Pretty Cool 👍and informative. Thanks Philipp for this content

  • @RajuYadav-qm4ic
    @RajuYadav-qm4ic Год назад

    kotlin DSL in Now default in android studio giraffe jetpack empty project

  • @wiiznokes2237
    @wiiznokes2237 2 года назад

    Why make 2 language for that

  • @jopadjr
    @jopadjr Год назад

    541st...Thanks Philipp

  • @AayushSarikhada1o1
    @AayushSarikhada1o1 2 года назад +1

    Content🤌🤌🤌

  • @IT_master_ir
    @IT_master_ir Год назад

    فلیپ فلیپ ، این دهن مارو سرویس کرده بود