kordamp / enforcer-gradle-plugin

Kordamp Enforcer Gradle Plugin
Apache License 2.0
23 stars 3 forks source link

EnforceBytecodeVersion: check if the package name is valid #27

Closed aalmiray closed 1 year ago

aalmiray commented 1 year ago

Apply a regex such as "^[a-z]+(.[a-z][a-z0-9])$" to check if a given classfile entry has a valid package name.

The gradle-api-* JARs do not follow the MR-JAR constraints and contain entries such as org/gradle/internal/impldep/META-INF/versions/9/org/junit/platform/commons/util/ModuleUtils.class which cannot be loaded as their package name is invalid. Entries like this should not be scanned.

See https://github.com/gradle/gradle/issues/23002

aalmiray commented 1 year ago

Released in v0.12.0 -> https://github.com/kordamp/enforcer-gradle-plugin/releases/tag/v0.12.0