Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle tasks are disabled in eclipse

I'm trying to create a .jar file for my eclipse project. Through export option, I am able to create .jar, but I want to use Gradle build task to do so. Problem is that, all tasks are disabled for this particular project only, as showing in the following image...

Gradle Tasks

For another project, these Gradle tasks are working fine. See its build.gradle file...

apply plugin : 'eclipse'
apply plugin: 'java-library'

repositories {
    jcenter()
    mavenCentral()
}

dependencies {
    compile group:"org.apache.pdfbox", name:"pdfbox", version:"2.0.6"
    compile group:"org.apache.pdfbox", name:"pdfbox-tools", version:"2.0.6"
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'org.json:json:20180130'

    api 'org.apache.commons:commons-math3:3.6.1'

    implementation 'com.google.guava:guava:21.0'

    testImplementation 'junit:junit:4.12'
}

It's settings.gradle file contains a single line that is...

rootProject.name = 'schedule-extractor'

Can anybody suggest what I am missing here?

like image 923
Khan Avatar asked Jun 08 '18 05:06

Khan


1 Answers

Have you check this buildship's issue: https://github.com/eclipse/buildship/issues/511

The following comment resolved it for me (I was having the same problem) : https://github.com/eclipse/buildship/issues/511#issuecomment-367392031

For those who had a similar problem in include builds - Check the file .setting/org.eclipse.buildship.core.prefs whether the connection.project.dir property is empty. If not, make it empty. In my case the grayed tasks become green again.

like image 133
TahitianGabriel Avatar answered Oct 22 '22 11:10

TahitianGabriel