I’m new to Gradle and I don’t know what to do.
Here is Quasar docs about how to install Quasar through Gradle: Quasar Docs
There is also a template project in the page: Template Gradle Project
Update:
This is my new build.gradle
:
group 'TGAdminsBot’
version ‘0.1’
apply plugin: 'java'
apply plugin: 'idea'
//apply plugin: 'application'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
//mainClassName = "Launcher"
idea {
module
{
downloadJavadoc = true
downloadSources = true
}
}
dependencies {
quasar 'co.paralleluniverse:quasar-core:0.7.4:jdk8'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.4'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.4'
//compile 'com.github.User:Repo:Tag'
//compile 'com.mashape.unirest:unirest-java:1.4.9'
compile 'co.paralleluniverse:comsat-httpclient:0.7.0'
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.2.0'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
configurations {
quasar
}
tasks.withType(JavaExec)
{
jvmArgs "-javaagent:${configurations.quasar.singleFile}"
}
task run(type: JavaExec) {
// jvmArgs "-javaagent:${configurations.quasar.iterator().next()}"
main = 'com.sunova.bot.Launcher'
classpath = sourceSets.main.runtimeClasspath
}
run.delepndsOn runQuasar
And this is new Exception
:
9:09:36 PM: Executing external task ‘run’…
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Sobhan\Documents\IntelliJIDEAProjects\TGAdminsBot\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating root project 'TGAdminsBot'.
> Could not find method quasar() for arguments [co.paralleluniverse:quasar-core:0.7.4:jdk8] on root project 'TGAdminsBot'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
What is wrong this time?