android icon indicating copy to clipboard operation
android copied to clipboard

feat: gradle 8, kotlin 2.0

Open triniwiz opened this issue 1 year ago • 2 comments
trafficstars

triniwiz avatar Apr 15 '24 07:04 triniwiz

Adds the following

  • Gradle 8
  • kotlin 2.0
  • java 17
  • kotlin enabled by default

triniwiz avatar Apr 16 '24 02:04 triniwiz

Hey @triniwiz, we need this too in app/build.gradle before tasks.configureEach

rootProject.subprojects.forEach {
  it.tasks.configureEach({ DefaultTask currentTask ->
    if (currentTask =~ /.+bundleLibCompileToJar.*/) {
      cleanupAllJars.dependsOn currentTask
    }
  })
}

This fixes this error with adding open-native since it adds subprojects alongside :app subproject.

Gradle detected a problem with the following location: '/Volumes/DataDrive/Projects/nativescript/open-native/packages/core/react-android/react/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar'.
    
    Reason: Task ':app:cleanupAllJars' uses this output of task ':react:bundleLibCompileToJarDebug' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':react:bundleLibCompileToJarDebug' as an input of ':app:cleanupAllJars'.
      2. Declare an explicit dependency on ':react:bundleLibCompileToJarDebug' from ':app:cleanupAllJars' using Task#dependsOn.
      3. Declare an explicit dependency on ':react:bundleLibCompileToJarDebug' from ':app:cleanupAllJars' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.4/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

ammarahm-ed avatar Apr 26 '24 17:04 ammarahm-ed