[Solved] I want to copy JS libs into resource fold...
# gradle
f
[Solved] I want to copy JS libs into resource folder after build. but I am having a problem with the configuration 'implementation' when build. Message error:
Copy code
Resolving dependency configuration 'implementation' is not allowed as it is defined as 'canBeResolved=false'.
Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'implementation' should be resolved.
I tried with 'compileClasspath' and 'runtimeClasspath' but dont work. Do i need to create my own implementation or use another? My Code:
Copy code
tasks.build{
   doLast {
      configurations["implementation"].forEach {
           copy{
                includeEmptyDirs = false
                from(zipTree(it.absolutePath))
                into("$resources/lib/kotlin")
                include { fileTreeElement ->
                    val path = fileTreeElement.path
                    path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
                }
               }
      }   }
}
Solved creating my custom configuration and extendsFrom 'implementation'
Copy code
val implConfig by configurations.creating {
    extendsFrom(configurations["implementation"])            
}
124 Views