Gradle task groovyDoc failing with NoClassDefFoundError
By : lorikgator
Date : March 29 2020, 07:55 AM
Any of those help I upgraded to the current version of Gradle (1.10) and continued to get the same error. Added the following to my build.gradle and now it's working. code :
configurations {
jansi.extendsFrom(runtime)
}
groovydoc {
def title = "IPDS ${version}"
groovyClasspath = project.configurations.jansi
}
dependencies {
jansi 'org.fusesource.jansi:jansi:1.11'
|
Run 'uninstallAll' gradle task before running application in Android Studio from build.gradle
By : user3600058
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , What you may need is to set defaultTasks: code :
defaultTasks uninstallAll
runTaskName.dependsOn(uninstallAll)
|
Gradle NoClassDefFoundError when running jar
By : Alexey
Date : March 29 2020, 07:55 AM
hop of those help? You need to create a runnable jar if you want to be able to run it. You can use shadojar plugin or extend the jar task to pack the runtime deps into an artifact. code :
jar {
archiveName = 'Name.jar'
manifest {
attributes 'Main-Class': 'your.main.class',
'Class-Path': configurations.runtime.files.collect { "lib/$it.name" }.join(' '),
'Implementation-Version': project.version
}
from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }) {}
}
apply plugin: 'idea'
|
Run a Gradle plugin task when Gradle build is running (not manually from command line)
By : Sunyoung Lee
Date : March 29 2020, 07:55 AM
it fixes the issue From the official documentation: The default run/debug configuration launches the default project activity and uses the Select Deployment Target dialog for target device selection. If the default settings don't suit your project or module, you can customize the run/debug configuration, or even create a new one, at the project, default, and module levels. To edit a run/debug configuration, select Run > Edit Configurations.
|
How to stop Android Studio from running my gradle task when syncing project with Gradle files?
By : user1626401
Date : March 29 2020, 07:55 AM
With these it helps Your task does not run at all, it is just configured. Gradle distinguishes between the configuration phase and the execution phase. On each invocation, every task is configured, but only the tasks passed to Gradle and their task dependencies are executed. As IntelliJ / AndroidStudio invokes Gradle on sync, every task is configured on sync. When you define a task in Gradle, the closure you pass is used for configuration. Only task actions (internal functionality), doFirst and doLast closures are executed during execution phase. For your custom task, you should put your functionality into such a closure: code :
task example {
println 'Configuration'
doLast {
println 'Execution'
}
}
|