Found a solution on Gradle’s forum:
jar {
manifest {
attributes(
"Class-Path": configurations.compile.collect { it.getName() }.join(' '))
}
}
More Related Contents:
- How do I exclude all instances of a transitive dependency when using Gradle?
- How to add local .jar file dependency to build.gradle file?
- Is it possible to declare a variable in Gradle usable in Java?
- How do I tell Gradle to use specific JDK version?
- Creating runnable JAR with Gradle
- Peer not authenticated while importing Gradle project in eclipse
- Gradle – Could not find or load main class
- JCenter deprecation; impact on Gradle and Android
- What does transitive = true in Gradle exactly do (w.r.t. crashlytics)?
- java.util.scanner throws NoSuchElementException when application is started with gradle run
- Maven profiles equivalent of Gradle
- Error: Gradle: execution failed for task ‘:app:preDexDebug’
- How can I force Gradle to set the same version for two dependencies?
- Error:Execution failed for task ‘:app:packageRelease’. > Unable to compute hash of /../AndroidStudioProjects/../classes.jar
- Manifest merger failed : Attribute application@appComponentFactory updating Firebase libraries
- How to run Gradle test when all tests are UP-TO-DATE?
- How to add ojdbc7 to Java web app by Gradle?
- Multi-project test dependencies with gradle
- Error:Execution failed for task ‘:app:dexDebug’. com.android.ide.common.process.ProcessException
- UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define
- Console application with Java and gradle
- How do I resolve “Duplicate files copied in APK META-INF/*”
- Multiple dex files define /BuildConfig, can’t find the cause:
- How to give System property to my test via Gradle and -D
- Building with Intellij 2017.2 /out directory duplicates files in /build directory
- How to make gradle generate a valid pom.xml file at the root of a project for maven users?
- Importing Facebook library in Android Studio: Could not find property ‘ANDROID_BUILD_SDK_VERSION’
- Integration Test with Spring Boot and Spock
- Gradle – download dependencies, lock versions and update dependencies manually
- Gradle task – pass arguments to Java application