Library Folder Gradle

I Want To Make When The Project Is Builded it Gives Me An My Jar File AND Folder Where Are Librares That I Select And If Library Is Removed It Dont Do What Library Do I Tryed Makig

repositories {
flatDir {
dirs 'libs'
}
}

in gradle.properties but ir not helps so how to do it?

0
1 comment

To configure your Gradle project to output a JAR file and include specific libraries from a designated folder while ensuring that the build process handles the presence or absence of these libraries correctly. This setup ensures that your project builds correctly, and it handles library inclusion flexibly based on what's present in the libs directory. 

task copyLibs(type: Copy) { 

from file('libs') 

into file("$buildDir/libs") 

include '*.jar' // Adjust this to match your library files } 

build.finalizedBy(copyLibs) // Ensure this runs after build

You can also refer to some similar questions on this topic:

https://intellij-support.jetbrains.com/hc/en-us/community/topics/200381535-JetGroovy subway surfers

0

Please sign in to leave a comment.