File tree Expand file tree Collapse file tree 6 files changed +49
-20
lines changed
src/main/java/com/igormaznitsa/jbbp/plugin/gradle
jbbp-maven/jbbp-maven-plugin/src/main/java/com/igormaznitsa/jbbp/plugin/mvn
jbbp/src/main/java/com/igormaznitsa/jbbp Expand file tree Collapse file tree 6 files changed +49
-20
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,13 @@ buildscript {
4747 }
4848}
4949
50+ tasks. withType(JavaCompile ) {
51+ options. compilerArgs << " -Xlint:deprecation"
52+ }
53+
5054task sourcesJar (type : Jar ) {
5155 duplicatesStrategy = ' include'
52- classifier = ' sources'
56+ archiveClassifier = ' sources'
5357 from sourceSets. main. allSource
5458}
5559
@@ -63,20 +67,16 @@ sourceSets {
6367 }
6468}
6569
66- pluginBundle {
70+ gradlePlugin {
6771 website = ' https://github.com/raydac/java-binary-block-parser'
6872 vcsUrl = ' https://github.com/raydac/java-binary-block-parser'
69- description = ' The plug-in processes JBBP scripts and generate Java classes from them'
70- tags = [' jbbp' , ' converter' ]
71- }
72-
73- gradlePlugin {
7473 plugins {
7574 jbbpPlugin {
7675 id = ' com.igormaznitsa.gradle.jbbp'
7776 displayName = ' JBBP Sources Generator plugin'
7877 implementationClass = ' com.igormaznitsa.jbbp.plugin.gradle.JBBPPlugin'
7978 description = ' The plug-in processes JBBP scripts and generate Java classes from them'
79+ tags = [' jbbp' , ' converter' ]
8080 }
8181 }
8282}
Original file line number Diff line number Diff line change 2424 <properties >
2525 <maven .compiler.source>1.8</maven .compiler.source>
2626 <maven .compiler.target>1.8</maven .compiler.target>
27- <gradle .executable>gradle </gradle .executable>
27+ <gradle .executable>gradle8 </gradle .executable>
2828 <gradleGoal >publishToMavenLocal</gradleGoal >
2929 </properties >
3030
Original file line number Diff line number Diff line change 22
33import static com .igormaznitsa .jbbp .utils .JBBPUtils .ARRAY_STRING_EMPTY ;
44
5-
65import com .igormaznitsa .jbbp .JBBPCustomFieldTypeProcessor ;
76import com .igormaznitsa .jbbp .compiler .JBBPNamedFieldInfo ;
87import com .igormaznitsa .jbbp .compiler .tokenizer .JBBPFieldTypeParameterContainer ;
8+ import com .igormaznitsa .jbbp .io .JBBPArraySizeLimiter ;
99import com .igormaznitsa .jbbp .io .JBBPBitInputStream ;
1010import com .igormaznitsa .jbbp .io .JBBPBitOrder ;
1111import com .igormaznitsa .jbbp .model .JBBPAbstractField ;
2727import org .gradle .api .plugins .JavaPlugin ;
2828import org .gradle .api .plugins .JavaPluginConvention ;
2929import org .gradle .api .tasks .Input ;
30- import org .gradle .api .tasks .Optional ;
3130import org .gradle .api .tasks .SourceSet ;
3231
3332/**
@@ -94,7 +93,9 @@ public JBBPAbstractField readCustomFieldType(@Nonnull final JBBPBitInputStream i
9493 @ Nullable final JBBPNamedFieldInfo fieldName ,
9594 final int extraData ,
9695 final boolean readWholeStream ,
97- final int arrayLength ) throws IOException {
96+ final int arrayLength ,
97+ final JBBPArraySizeLimiter arraySizeLimiter )
98+ throws IOException {
9899 throw new Error ("Must not be called" );
99100 }
100101 };
Original file line number Diff line number Diff line change 1919import static com .igormaznitsa .jbbp .plugin .common .utils .CommonUtils .ensureEncodingName ;
2020import static com .igormaznitsa .jbbp .utils .JBBPUtils .ARRAY_STRING_EMPTY ;
2121
22-
2322import com .igormaznitsa .jbbp .JBBPCustomFieldTypeProcessor ;
2423import com .igormaznitsa .jbbp .compiler .JBBPNamedFieldInfo ;
2524import com .igormaznitsa .jbbp .compiler .tokenizer .JBBPFieldTypeParameterContainer ;
25+ import com .igormaznitsa .jbbp .io .JBBPArraySizeLimiter ;
2626import com .igormaznitsa .jbbp .io .JBBPBitInputStream ;
2727import com .igormaznitsa .jbbp .io .JBBPBitOrder ;
2828import com .igormaznitsa .jbbp .mapper .Bin ;
@@ -380,7 +380,10 @@ public JBBPAbstractField readCustomFieldType(@Nonnull final JBBPBitInputStream i
380380 @ Nullable final JBBPNamedFieldInfo fieldName ,
381381 final int extraData ,
382382 final boolean readWholeStream ,
383- final int arrayLength ) throws IOException {
383+ final int arrayLength ,
384+ @ Nonnull
385+ final JBBPArraySizeLimiter arraySizeLimiter )
386+ throws IOException {
384387 throw new Error ("Must not be called" );
385388 }
386389 };
Original file line number Diff line number Diff line change 7272import java .util .Collections ;
7373import java .util .List ;
7474import java .util .Map ;
75- import java .util .Objects ;
7675import java .util .Properties ;
7776
7877/**
@@ -277,15 +276,18 @@ public JBBPParserExpressionArraySizeController getExpressionArraySizeController(
277276 /**
278277 * Set current registered instance of controller to check array size calculated by expression.
279278 *
280- * @param arraySizeObserver instance of array size observer, must not be null.
279+ * @param arraySizeController instance of array size observer, must not be null.
281280 * @return instance of the parser.
282281 * @throws NullPointerException if argument is null
283282 * @see #DEFAULT_EXPRESSION_ARRAY_SIZE_CONTROLLER
284283 * @since 2.1.0
285284 */
286285 public JBBPParser setExpressionArraySizeController (
287- final JBBPParserExpressionArraySizeController arraySizeObserver ) {
288- this .expressionArraySizeController = Objects .requireNonNull (arraySizeObserver );
286+ final JBBPParserExpressionArraySizeController arraySizeController ) {
287+ if (arraySizeController == null ) {
288+ throw new NullPointerException ("Controller value must not be null" );
289+ }
290+ this .expressionArraySizeController = arraySizeController ;
289291 return this ;
290292 }
291293
Original file line number Diff line number Diff line change 256256 <configuration >
257257 <failFast >true</failFast >
258258 <rules >
259- <dependencyConvergence />
260- <banDuplicateClasses />
259+ <dependencyConvergence >
260+ <excludedScopes >
261+ <scope >test</scope >
262+ <scope >provided</scope >
263+ <scope >runtime</scope >
264+ </excludedScopes >
265+ <excludes >
266+ <exclude >org.codehaus.*</exclude >
267+ <exclude >org.apache.maven.*</exclude >
268+ </excludes >
269+ </dependencyConvergence >
270+ <banDuplicateClasses >
271+ <ignoreClasses >
272+ <ignoreClass >com.plexus.*</ignoreClass >
273+ <ignoreClass >javax.*</ignoreClass >
274+ <ignoreClass >org.codehaus.*</ignoreClass >
275+ </ignoreClasses >
276+ <ignoredScopes >
277+ <ignoredScope >test</ignoredScope >
278+ <ignoredScope >provided</ignoredScope >
279+ </ignoredScopes >
280+ <ignoreWhenIdentical >true</ignoreWhenIdentical >
281+ <findAllDuplicates >true</findAllDuplicates >
282+ </banDuplicateClasses >
261283 <banCircularDependencies />
262284 <enforceBytecodeVersion >
263285 <maxJdkVersion >${maven.compiler.target} </maxJdkVersion >
264286 <ignoredScopes >
265287 <ignoredScope >test</ignoredScope >
288+ <ignoredScope >provided</ignoredScope >
266289 </ignoredScopes >
267290 </enforceBytecodeVersion >
268291 </rules >
271294 <dependency >
272295 <groupId >org.codehaus.mojo</groupId >
273296 <artifactId >extra-enforcer-rules</artifactId >
274- <version >1.7 .0</version >
297+ <version >1.8 .0</version >
275298 </dependency >
276299 </dependencies >
277300 </plugin >
You can’t perform that action at this time.
0 commit comments