Gradle plugin & Maven Enforcer rule that restricts usage of unwanted imports in Java, Kotlin and Groovy source files.
MIT License
Bot releases are visible (Hide)
[!NOTE]
This is the first release after migrating our build to Gradle and which uses shaded dependencies.
If you encounter any irregularities with this version, please do not hesitate to file an issue.
maven
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.5.0</version>
</dependency>
Gradle plugin DSL
plugins {
id("de.skuzzle.restrict.imports") version "2.5.0"
}
Gradle Legacy
buildscript {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("de.skuzzle.enforcer:restrict-imports-gradle-plugin:2.5.0")
}
}
apply(plugin = "de.skuzzle.restrict.imports")
Gradle version catalog (Toml)
[plugins]
restrictImports = { id = "de.skuzzle.restrict.imports", version = "2.5.0" }
Published by skuzzle 9 months ago
[!NOTE]
This is the first release after migrating our build to Gradle and which uses shaded dependencies.
If you encounter any irregularities with this version, please do not hesitate to file an issue.
Maven Central coordinates for this release:
maven
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.5.0-rc-2</version>
</dependency>
Gradle plugin DSL
plugins {
id("de.skuzzle.restrict.imports") version "2.5.0-rc-2"
}
Gradle Legacy
buildscript {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("de.skuzzle.enforcer:restrict-imports-gradle-plugin:2.5.0-rc-2")
}
}
apply(plugin = "de.skuzzle.restrict.imports")
Gradle version catalog (Toml)
[plugins]
restrict-imports = { id = "de.skuzzle.restrict.imports", version = "2.5.0-rc-2" }
Published by skuzzle 9 months ago
Maven Central coordinates for this release:
maven
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.5.0-rc-1</version>
</dependency>
Gradle plugin DSL
plugins {
id("de.skuzzle.restrict.imports") version "2.5.0-rc-1"
}
Gradle Legacy
buildscript {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("de.skuzzle.enforcer:restrict-imports-gradle-plugin:2.5.0-rc-1")
}
}
apply(plugin = "de.skuzzle.restrict.imports")
Gradle version catalog (Toml)
[plugins]
restrict-imports = { id = "de.skuzzle.restrict.imports", version = "2.5.0-rc-1" }
Published by skuzzle over 1 year ago
Published by skuzzle over 1 year ago
Published by skuzzle over 1 year ago
Maven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.3.1</version>
</dependency>
Published by skuzzle over 1 year ago
**
wildcard must match at least a single package partMaven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.3.0</version>
</dependency>
Published by skuzzle over 1 year ago
Maven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.2.0</version>
</dependency>
Published by skuzzle almost 2 years ago
<parseFullCompilationUnit>true</parseFullCompilationUnit>
)Maven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.1.0</version>
</dependency>
Published by skuzzle almost 3 years ago
This is a new major release. Upgrading the version might break your build if you don't adjust your configuration
according to the changes mentioned below. Please carefully read the changes section when you are upgrading from 1.x.y
.
(Note: Review carefully, as those might break your existing build when updating from version 1.x.y
)
<includeTestCode>
option is configured false
.<restrictImports implementation="de.skuzzle.enforcer.restrictimports.RestrictImports">
(deprecated since 0.12.0
).<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
(deprecated since 1.4.0
).-Drestrictimports.skip
and -Drestrictimports.failBuild
command line options.<parallel>
(-Drestrictimports.parallel
) option to run the whole analysis in parallel (Experimental feature, feedback welcome).Maven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>2.0.0</version>
</dependency>
Published by skuzzle almost 3 years ago
<RestrictImports>
instead of requiring fully qualified class name.enforcer-api:3.0.0
(coming from 3.0.0-M1
)<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
<RestrictImports>
. Using the deprecated declaration will print a warning during the build. The2.x.x
1.3.0
can still be found in CHANGELOG_LEGACY.md
file.Maven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>1.4.0</version>
</dependency>
Published by skuzzle about 3 years ago
Maven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>1.3.0</version>
</dependency>
Published by skuzzle over 5 years ago
sourceFileCharset
commentLineBufferSize
Published by skuzzle over 5 years ago
SourceLineParser
implementationsfailBuild
and skip
options"*
would be recognized as the beginning of a block commentPublished by skuzzle over 5 years ago