MaterialThemeBuilder
MaterialThemeBuilder copied to clipboard
How to use it on groovy
I have a project using Groovy which currently doesn't migrate well to kotlin so I try to use the plugin directly But when I use the script from the readme it returns these
A problem occurred evaluating project ':app'.
> Could not find method materialThemeBuilder() for arguments [build_2r1zpgfyezj6i5x4degpjys53$_run_closure2@4a4ea82] on project ':app' of type org.gradle.api.Project.
Could you please provide an example of groovy?
on my another test kotlin project, i got these error
C:\Users\19811\AndroidStudioProjects\bh3_login_simulation> .\gradlew build
> Task :buildSrc:compileKotlin
w: API version 1.3 is deprecated and its support will be removed in a future version of Kotlin
> Configure project :app
WARNING:API 'android.registerTransform' is obsolete.
It will be removed in version 8.0 of the Android Gradle plugin.
The Transform API is removed to improve build performance. Projects that use the
Transform API force the Android Gradle plugin to use a less optimized flow for the
build that can result in large regressions in build times. It’s also difficult to
use the Transform API and combine it with other Gradle features; the replacement
APIs aim to make it easier to extend the build without introducing performance or
correctness issues.
There is no single replacement for the Transform API—there are new, targeted
APIs for each use case. All the replacement APIs are in the
`androidComponents {}` block.
The Transform API uses incremental APIs deprecated since Gradle 7.5. Please add
`android.experimental.legacyTransform.forceNonIncremental=true` to
`gradle.properties` to fix this issue. Note that this will run transforms
non-incrementally and may have a build performance impact.
For more information, see https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-api.
...
WARNING: Debugging obsolete API calls can take time during configuration. It's recommended to not keep it on at all times.
e: C:\Users\19811\AndroidStudioProjects\bh3_login_simulation\app\build.gradle.kts:120:1: Unresolved reference: materialThemeBuilder
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\19811\AndroidStudioProjects\bh3_login_simulation\app\build.gradle.kts' line: 120
* What went wrong:
Script compilation error:
Line 120: materialThemeBuilder {}
^ Unresolved reference: materialThemeBuilder
1 error
Dependency is configured correctly but doesn't work
Maybe you forgot to apply the plugin?
the plugin already applied Here is the project repository, can you help me to find what I am missing https://github.com/HonkaiScanner/bh3_login_simulation/tree/dev
I got some example from HideMyAppList, so maybe some unnecessary code