Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Add eclipse plugin with correct configuration to build.gradle #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Each exercise is created as a failing unit test and your job is to make it pass.

Here https://www.jetbrains.com/help/idea/gradle.html you can read how to work with Gradle projects in IntelliJ IDEA.

##### Working with the project using Eclipse:

1. Run `./gradlew eclipse` (this creates the correct .project and .classpath required by Eclipse)
2. Import the project as Existing Project

##### Working with the commandline

You can also build the project and run all tests in the terminal:
Expand Down
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ buildscript {
}

apply plugin: 'kotlin'
apply plugin: 'eclipse'

sourceSets {
main.java.srcDirs += 'src'
Expand All @@ -26,3 +27,16 @@ dependencies {
compile 'com.google.guava:guava:16.0'
testCompile 'junit:junit:4.12'
}

eclipse {
project {
natures 'org.jetbrains.kotlin.core.kotlinNature'
buildCommand 'org.jetbrains.kotlin.ui.kotlinBuilder'
linkedResource(
name: 'kotlin_bin',
type: '2',
locationUri: "org.jetbrains.kotlin.core.filesystem:/${name}/kotlin_bin".toString()
)
}
classpath.containers 'org.jetbrains.kotlin.core.KOTLIN_CONTAINER'
}