Skip to content

Commit

Permalink
Release 2.5.0-rc-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Jan 19, 2024
1 parent 7cebf6b commit bd4dc00
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
1 change: 1 addition & 0 deletions .git-askpass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo $GITHUB_PSW
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!-- This file is auto generated during release from readme/README.md -->

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=2.4.1-refactor-release-SNAPSHOT&color=blue)](https://search.maven.org/artifact/de.skuzzle.enforcer/restrict-imports-enforcer-rule/2.4.1-refactor-release-SNAPSHOT/jar)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=2.5.0-rc-1&color=blue)](https://search.maven.org/artifact/de.skuzzle.enforcer/restrict-imports-enforcer-rule/2.5.0-rc-1/jar)
[![Coverage Status](https://coveralls.io/repos/github/skuzzle/restrict-imports-enforcer-rule/badge.svg?branch=master)](https://coveralls.io/github/skuzzle/restrict-imports-enforcer-rule?branch=master)
[![Twitter Follow](https://img.shields.io/twitter/follow/skuzzleOSS.svg?style=social)](https://twitter.com/skuzzleOSS)

# restrict-imports-enforcer-rule
Keep your code base clean and free from usage of unwanted classes! [More](#rationale)

Supported source files:
- [x] Java
- [x] Kotlin (since 0.15)
- [x] Groovy (since 0.15)
Expand All @@ -27,7 +29,7 @@ information or have a look at the [Full configuration example](#full-configurati
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.4.1-refactor-release-SNAPSHOT</version>
<version>2.5.0-rc-1</version>
</dependency>
</dependencies>
<executions>
Expand Down Expand Up @@ -56,6 +58,12 @@ information or have a look at the [Full configuration example](#full-configurati

## Gradle quick start

> [!CAUTION]
> Gradle support is quite new and should be considered experimental.
> Documentation will follow, for now you can check out the func tests [here](https://github.com/skuzzle/restrict-imports-enforcer-rule/blob/gradle-plugin/restrict-imports-gradle-plugin/src/functionalTest/groovy/de/skuzzle/restrictimports/gradle/RestrictImportsGroovyFuncTest.groovy).
>
> Feedback is welcome and should be filed as new GitHub issue.
### ... with Groovy DSL
```
plugins {
Expand Down Expand Up @@ -178,7 +186,7 @@ possible to define multiple banned imports/exclusions/allowed imports or base pa
```

## Not-fixable imports
> **Note**
> [!NOTE]
> This is an experimental feature added in 2.4.0
In certain situations you might not be able to avoid using a banned import. For example if you implement an
Expand All @@ -204,7 +212,7 @@ you can allow them to be used only in some explicitly configured locations.

You can add multiple _not-fixable_ definitions if you nest them in `<notFixables></notFixables>`.

> **Note**
> [!NOTE]
> Not fixable definitions can not be nested in `<groups>` (see _Rule groups_ below). Not-fixables apply globally per
> `RestrictImports` rule instance.
Expand Down Expand Up @@ -255,7 +263,7 @@ more specific `basePackage` of the second group. In that case, only the definiti
class.

## Static imports
> **Note**
> [!NOTE]
> Behavior of static import detection has been changed with version 2.0.0
Every package pattern also automatically matches `static` imports. However, it is possible to explicitly mention the
Expand Down Expand Up @@ -370,7 +378,7 @@ The option currently only affects parsing of java source files. When enabled, we
java source file, creating an actual AST. This allows to also detect full qualified class usages but will be
considerably slower.

> **Warning**
> [!WARNING]
> In case a source file cannot be properly parsed, we try to fall back to our _native_ line-by-line parsing
> approach described [here](#syntactical-limitation). A respective warning will be issued in the
> report that is generated at the end.
Expand Down Expand Up @@ -408,7 +416,7 @@ String split operations and only reading each source file up until a non-import
discovered. We cover a set of esoteric edge cases, for example block comments within a single import statement and the
like.

> **Info**
> !NOTE]
> Plus side to this approach is, that we are mostly agnostic to the Java version you are using. Our parser doesn't
> need updates even if you want to use latest Java language features in your code base.
Expand Down
13 changes: 6 additions & 7 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=2.4.1-refactor-release-SNAPSHOT&color=blue)](https://search.maven.org/artifact/de.skuzzle.enforcer/restrict-imports-enforcer-rule/2.4.1-refactor-release-SNAPSHOT/jar)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=2.5.0-rc-1&color=blue)](https://search.maven.org/artifact/de.skuzzle.enforcer/restrict-imports-enforcer-rule/2.5.0-rc-1/jar)

### Bug fixes
### Features
* [#59](https://github.com/skuzzle/restrict-imports-enforcer-rule/issues/59) Provide a Gradle plugin


Maven Central coordinates for this release:

maven
```xml
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.4.1-refactor-release-SNAPSHOT</version>
<version>2.5.0-rc-1</version>
</dependency>
```

Gradle plugin DSL
```groovy
plugins {
id("de.skuzzle.restrict.imports") version "2.4.1-SNAPSHOT"
id("de.skuzzle.restrict.imports") version "2.5.0-rc-1"
}
```

Expand All @@ -31,7 +30,7 @@ buildscript {
}
}
dependencies {
classpath("de.skuzzle.enforcer:restrict-imports-gradle-plugin:2.4.1-SNAPSHOT")
classpath("de.skuzzle.enforcer:restrict-imports-gradle-plugin:2.5.0-rc-1")
}
}
Expand All @@ -41,5 +40,5 @@ apply(plugin = "de.skuzzle.restrict.imports")
Gradle version catalog (Toml)
```toml
[plugins]
restrict-imports = { id = "de.skuzzle.restrict.imports", version = "2.4.1-SNAPSHOT" }
restrict-imports = { id = "de.skuzzle.restrict.imports", version = "2.5.0-rc-1" }
```

0 comments on commit bd4dc00

Please sign in to comment.