Better use Kotlin DSL than Groovy DSL, by now it is the default DSL, you immediately get type-safe build scripts, actually useful error messages if you mess up the syntax, and amazingly better IDE support if you use a good IDE like IntelliJ IDEA or Android Studio
Is it really a Java project, or why do you apply the java plugin?
If you ever consider sharing or even just moving the project, don’t use absolute paths
There is a dedicated Node.js plugin, that even provisions Node.js for you if you care. From what you showed, you just use Gradle as replacement for a shell script. You can do that, but you might miss out on some things.