Skip to content

Commit

Permalink
docs: add samples to README
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMrMilchmann committed Jun 22, 2022
1 parent 90a0ce8 commit 96399ca
Showing 1 changed file with 60 additions and 1 deletion.
61 changes: 60 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,66 @@ This plugin is loosely based on [Niklas Walter's Gradle Eclipse Compiler for Jav

## Usage

TODO
## Gradle Groovy DSL

```groovy
plugins {
id "io.github.themrmilchmann.ecj" version "0.1.0"
}
```

Usually, simply applying the plugin is enough to cover most use-cases. However,
in some scenarios, the ECJ artifact may be changed.

### Configuring ECJ (via dependency)

```groovy
dependencies {
ecj "org.eclipse.jdt:ecj:3.30.0"
}
```

### Configuring ECJ (via extension)

```groovy
ecj {
compilerGroupId = "org.eclipse.jdt"
compilerArtifactId = "ecj"
compilerVersion = "3.30.0"
}
```

## Gradle Kotlin DSL

### Applying the plugin

```kotlin
plugins {
id("io.github.themrmilchmann.ecj") version "0.1.0"
}
```

Usually, simply applying the plugin is enough to cover most use-cases. However,
in some scenarios, the ECJ artifact may be changed.

### Configuring ECJ (via dependency)

```kotlin
dependencies {
ecj("org.eclipse.jdt:ecj:3.30.0")
}
```

### Configuring ECJ (via extension)

```kotlin
ecj {
compilerGroupId.set("org.eclipse.jdt")
compilerArtifactId.set("ecj")
compilerVersion.set("3.30.0")
}
```


## Compatibility Map

Expand All @@ -29,6 +81,13 @@ plugins {
| 7.4 | 0.1.0 |


## Plugin defaults

| Plugin version | Default ECJ version |
|----------------|---------------------|
| 0.1.0+ | 3.30.0 |


## Building from source

### Setup
Expand Down

0 comments on commit 96399ca

Please sign in to comment.