Skip to content

Commit

Permalink
Ensure java 11 using enforcer plugin (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
c00ler authored Nov 23, 2022
1 parent 7fc7794 commit c2c69fc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ compile 'io.github.cdimascio:dotenv-java:2.2.4'
implementation 'io.github.cdimascio:dotenv-java:2.2.4'
```

### Gradle Kotlin DSL

```kotlin
implementation("io.github.cdimascio:dotenv-java:2.2.4")
```

Looking for the Kotlin variant? **get [dotenv-kotlin](https://github.com/cdimascio/dotenv-kotlin)**.

## Usage
Expand Down
32 changes: 31 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@

<junit.version>4.13.2</junit.version>

<maven.enforcer.plugin>3.1.0</maven.enforcer.plugin>
<maven.compiler.plugin>3.5.1</maven.compiler.plugin>
<maven.source.plugin>3.0.1</maven.source.plugin>
<maven.javadoc.plugin>3.2.0</maven.javadoc.plugin>
<maven.surefire.plugin>2.22.0</maven.surefire.plugin>
Expand Down Expand Up @@ -95,11 +97,39 @@
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven.enforcer.plugin}</version>
<executions>
<execution>
<id>display-info</id>
<phase>validate</phase>
<goals>
<goal>display-info</goal>
</goals>
</execution>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>11</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>

<!-- compile java 1.8 for lib and java 11 for tests-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>${maven.compiler.plugin}</version>
<configuration>
<source>${compile.source}</source>
<target>${compile.source}</target>
Expand Down

0 comments on commit c2c69fc

Please sign in to comment.