Added Eclipse support for gradle
authorJeanderson Candido <jeandersonbc@gmail.com>
Mon, 2 Jul 2018 18:01:54 +0000 (15:01 -0300)
committerJeanderson Candido <jeandersonbc@gmail.com>
Mon, 2 Jul 2018 21:05:49 +0000 (18:05 -0300)
.gitignore
build.gradle

index 3b36854..9ccb9e2 100644 (file)
@@ -25,6 +25,7 @@ nbdist/
 .nb-gradle/
 
 ####### Covers Eclipse IDE #######
+.idea/
 .metadata
 tmp/
 *.tmp
@@ -34,8 +35,12 @@ tmp/
 .settings/
 .loadpath
 .recommenders
+.classpath
+.project
 
 ####### Covers JetBrains IDE: IntelliJ #######
+*.iml
+*.ipr
 
 # User-specific stuff:
 .idea/**/workspace.xml
index c2db9bc..93714b1 100644 (file)
@@ -2,6 +2,7 @@ plugins {
     id "com.gradle.build-scan" version "1.14"
     id "java"
     id "jacoco"
+    id "eclipse"
 }
 
 sourceCompatibility = 1.8
@@ -11,7 +12,7 @@ ext.manifestCommonAttrbutes = manifest {
     attributes(
         "Built-By": System.getProperty("user.name"),
         "Implementation-Vendor": "NASA Ames Research Center",
-        "Implementation-Version": "1234" // FIXME
+        "Implementation-Version": "8.0"
     )
 }
 
@@ -365,4 +366,22 @@ test {
     }
 }
 
+eclipse {
+    group = "JPF IDE Support"
+
+    project {
+        natures = ["org.eclipse.buildship.core.gradleprojectnature"]
+    }
+    classpath {
+        defaultOutputDir = buildDir
+        file {
+            whenMerged { classpath ->
+                classpath.entries.findAll{ entry -> entry.kind == "src" }*.every { srcNode ->
+                    srcNode.output = srcNode.output.replace("bin", "${buildDir.name}")
+                }
+            }
+        }
+    }
+}
+
 defaultTasks "buildJars"