THIS New Tool Strongly Speeds Up Your Gradle Builds

Поділитися
Вставка
  • Опубліковано 5 вер 2023
  • With KSP supporting more and more popular Android libraries like Dagger-Hilt and Room, we can now make use of it to speed up our Gradle builds by migrating away from the old Kapt tool.
    ⭐ Learn all the professional technologies applied in the industry
    ⭐ 100% money back guarantee for 30 days
    ⭐ Become an industry-ready Android developer now:
    pl-coding.com/premium-courses...
    💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
    pl-coding.com/drop-table-ment...
    Follow me on Instagram for insights into my live as an Android developer:
    / _philipplackner_
    Get the source code for this video on GitHub:
    github.com/philipplackner/Kap...

КОМЕНТАРІ • 74

  • @tonnie7079
    @tonnie7079 10 місяців тому +4

    I love the workings you have provided, I followed the steps to migrate ksp for room/dagger successfully. Thanks for always keeping us ahead in the Android Game.

  • @_angel_mohammadi3952
    @_angel_mohammadi3952 10 місяців тому +2

    Thanks a lot. You're one of the best Android teachers!❤

  • @PaweSzymanski-gk7po
    @PaweSzymanski-gk7po 10 місяців тому +12

    Yeeey! Finally KSP is supported by Dagger-Hitl! 🥳

    • @digipifini
      @digipifini 10 місяців тому

      Yep, dagger-hilt 2.47 was what made me stick with kapt

  • @OrlanDroyd
    @OrlanDroyd 10 місяців тому

    Always up to date!

  • @Zeeshan-Syed
    @Zeeshan-Syed 10 місяців тому +24

    ❗Heads-up❗:
    Make sure you declare the ksp plugin in root gradle but apply in app gradle.
    If you don't declare it in root, you'll run into gradle issues.

    • @tonnie7079
      @tonnie7079 10 місяців тому +3

      True, I had issues but when I moved it project module it worked fine

    • @richardatherton5229
      @richardatherton5229 8 місяців тому

      can you help? I just can't get it to run. I am using Android Studio Hedgehog. How do I "eclare the ksp plugin in root gradle but apply in app gradle"...thanks!

  • @huggydugy6369
    @huggydugy6369 4 місяці тому

    Thank you Philipp!

  • @patriciorodriguez6678
    @patriciorodriguez6678 10 місяців тому

    Thank you very much! Very interesting

  • @shekhar1038
    @shekhar1038 3 місяці тому

    The source to check the compatible version of Kotlin supporting ksp version makes this video still useful 👍

  • @OlegGolubev_yolo
    @OlegGolubev_yolo 10 місяців тому +1

    thats awesome!

  • @itgmaster098
    @itgmaster098 7 місяців тому

    thank you

  • @makix08
    @makix08 10 місяців тому

    Thank you, usefull !

  • @reksafitrananda7704
    @reksafitrananda7704 10 місяців тому +3

    android development is getting better and faster

  • @riyupapa39
    @riyupapa39 10 місяців тому +1

    Very goood !!!!!!!!

  • @chiragredij1734
    @chiragredij1734 8 місяців тому

    Hey phillip, So I am using kotlin compiler version 1.9.10 and everything with KSP and other dependencies are set but when I try to implement Hilt dependencies just the ones you used here Im met with error "Unsupported class file major version 63"... Im using Hilt version 2.48.1

  • @androidkotlin-6234
    @androidkotlin-6234 9 місяців тому

    Why when we adding ksp at top level gradle in the end we marked it like apply false?

  • @EnelAlmonte
    @EnelAlmonte 10 місяців тому

    @Philipp why you changed to compileOptions {
    sourceCompatibility = JavaVersion.VERSION_18
    Should I consider move away from JavaVersion.VERSION_1_8?

  • @MegaRockandroll09
    @MegaRockandroll09 10 місяців тому +1

    Do you have any issues with hilt testing? I'm getting lots of error. I guess since this is the first supported version there are many issues with testing.

  • @zoltanbalazskozma2360
    @zoltanbalazskozma2360 10 місяців тому

    Are you using a beta or canary version of Android Studio? On the latest stable version AGP 8.2.xx is not supported like you show here.

  • @kalibra2121
    @kalibra2121 10 місяців тому +3

    @Philipp let's say you want to keep databinding or something that doesn't support KSP yet, if we use Kapt for those and KSP for Room and Hilt, do we get some improvements in build times? or we only get faster builds if we give up on Kapt entirely?

    • @MegaRockandroll09
      @MegaRockandroll09 10 місяців тому

      complete ksp is faster as compiler don't have to wait for java stubs generation. if you use both then you won't get any significant changes to build time.

    • @hungnguyenmanh991
      @hungnguyenmanh991 8 місяців тому

      Google encourages the compose practices so they won't implement databinding to ksp.

  • @nm86nm
    @nm86nm 10 місяців тому +1

    Super tip

  • @jimpauloovejera2599
    @jimpauloovejera2599 10 місяців тому +8

    it would've been much better if you had display both kapt and ksp's build times

    • @PhilippLackner
      @PhilippLackner  10 місяців тому +5

      It's a free improvement without any downsides, I don't think it matters how much faster the build is as long as it is faster 😄

  • @safionweb
    @safionweb 10 місяців тому

    Can we use both in our project? KAPT and KSP?

  • @phuang3
    @phuang3 10 місяців тому +3

    Thanks. Just few weeks ago I tried KSP but it seems it has problems with Dagger Hilt. There was warning saying something was not recognized. I'm glad that latest Dagger Hilt supports KSP.

    • @houssemzaier
      @houssemzaier 10 місяців тому +1

      We are using it in the production environment we have no problem with the latest version ❤

    • @phuang3
      @phuang3 10 місяців тому

      @@houssemzaier Hi, does the compose support Kotlin 1.9.0? I remembered I have to downgrade to 1.8.10

    • @houssemzaier
      @houssemzaier 10 місяців тому

      @@phuang3 it does support that

    • @sudarshanbhatt9435
      @sudarshanbhatt9435 10 місяців тому +1

      @phuang3 ye compose support 1.9

    • @phuang3
      @phuang3 10 місяців тому

      @@sudarshanbhatt9435 Tried kotlin 1.9.10 and KSP today. Too bad KSP doesn't support databinding anymore, so I have to include the kapt again...

  • @JeffreyLiu8
    @JeffreyLiu8 10 місяців тому +1

    i tried it and it work for debug, bug release build has minify issue.

  • @animehub883
    @animehub883 3 місяці тому

    you did good , the only downside is that the version for the hilt compiler and plugin is now 2.50 and the need of jvm in the project gradle file for it to work

  • @bro_chenzox
    @bro_chenzox 10 місяців тому

    One point nine point zero point got point nice point video X)

  • @aliveli2941
    @aliveli2941 9 місяців тому

    how can we use KSP and Navigation component together? I get that error below;
    Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.

  • @GeorgeKarlR
    @GeorgeKarlR 10 місяців тому

    Can you make an app and publish it with your own server in the computer ? Data is live

  • @sergeilebedev7725
    @sergeilebedev7725 10 місяців тому

    this is did not work in my project. I had a problem with ksp failed in room to find some types of the properties. I think it is because i use classes generated by GraphQL Apollo library.

  • @SilasOhee
    @SilasOhee 9 місяців тому

    Yup, Why does your face always appear in the recommendation list, you have the solution to the problem I'm facing... Thank you very much.

  • @user-qq4td6ks3k
    @user-qq4td6ks3k 9 місяців тому

    I'm implement this but it take time around 6 min for build it not improve. it same to my old time. can you help me to improve build time.

  • @argahutama
    @argahutama 10 місяців тому +1

    cool

  • @EverythingWithKotlin
    @EverythingWithKotlin 10 місяців тому

    Wow hilt support ksp now ..

  • @ChrisAthanas
    @ChrisAthanas 10 місяців тому +2

    4:34 I hope the ai tool will help with this versioning and confusing configuration details some day soon
    It’s a complete nightmare on android and needs to be addressed
    It’s the most annoying thing on android!

  • @CodingWithTaaxo
    @CodingWithTaaxo 10 місяців тому +11

    Unfortunately if you use ksp with kapt e.g if you're using libraries that don't yet support ksp, then you'll still have slower build times and ksp will be useless at that time

    • @riyupapa39
      @riyupapa39 10 місяців тому

      Kind of retrofit? or else?

    • @martonbraun3213
      @martonbraun3213 10 місяців тому +1

      KSP still isn't useless - the more tools you have on KSP instead of KAPT the better state your build is in. However, it's true that you'll get the greatest improvement if you completely remove KAPT.
      What libraries do you have that still need KAPT?

    • @bidbid5413
      @bidbid5413 10 місяців тому

      Can you use both ksp and kapt?

    • @riyupapa39
      @riyupapa39 10 місяців тому

      @@bidbid5413 Is that possible use both? ( I'm a beginer of KSP )

    • @MegaRockandroll09
      @MegaRockandroll09 10 місяців тому +1

      @@riyupapa39 yes

  • @emreyigit7671
    @emreyigit7671 6 місяців тому

    I'm getting this error and I couldn't solve it

  • @johnibat
    @johnibat 3 місяці тому

    👍🙏

  • @javimar69
    @javimar69 10 місяців тому +2

    Greetings... If you have databinding, you must keep kapt :-(

    • @ChrisAthanas
      @ChrisAthanas 10 місяців тому +2

      Drop xml as soon as possible
      It’s dead

    • @FilipLarssons
      @FilipLarssons 10 місяців тому

      Databinding is dead, but the scroll performance of Compose is too bad to fully drop XML @@ChrisAthanas

  • @ER-alkusi-mahato
    @ER-alkusi-mahato 10 місяців тому

    Jay goram

  • @nrg4285
    @nrg4285 10 місяців тому

    Just FYI the video and audio is fairly degraded in this exported video... maybe check with your editor

  • @shubhamkumargupta3478
    @shubhamkumargupta3478 2 місяці тому

    I hate ksp many places it is simply not supported properly with unknown error thrown

  • @rogercolque
    @rogercolque 10 місяців тому

    cool tool
    very far from my learning.

  • @TVHovna
    @TVHovna 10 місяців тому

    Nice, another clickbait. Claiming that it speeds up compilation without providing any examples/results.

    • @PhilippLackner
      @PhilippLackner  10 місяців тому +2

      Read the facts here: developer.android.com/build/migrate-to-ksp
      You don't have to click on the videos :)

    • @ChrisAthanas
      @ChrisAthanas 10 місяців тому +1

      Some one needs a nap

    • @schrodingerscat3912
      @schrodingerscat3912 10 місяців тому +1

      sorry @TVHovna but you'll never be a grouchier Android dev than me. I'm the Winnebago Man of Android development

    • @ChrisAthanas
      @ChrisAthanas 10 місяців тому +2

      @@schrodingerscat3912 Android dev def brings out the grouchy
      It's a huge pain in the ass

    • @TVHovna
      @TVHovna 10 місяців тому

      @@ChrisAthanas sorry guys but it's 101 of optimalization to measure before and after optimalizations are applied :D thumbnail is flashy and says that builds are up to 2 times faster, yet 0 proof or real observation is presented, therefore it is lying/misleading, not backing up serious claims. Do that to a client and you'll make yourself look like a dummy.

  • @easybusinessou
    @easybusinessou 10 місяців тому

    convert to KSP is successful , it' really faster

  • @excalibur8147
    @excalibur8147 10 місяців тому

    Still waiting for ksp to support retrofit 🥲

    • @martonbraun3213
      @martonbraun3213 10 місяців тому

      Why does Retrofit need support for KSP? Where do you use codegen with Retrofit?