diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d73e6fa..7b69fdb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,8 +9,11 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" + groups: + freefair: + patterns: + - "io.freefair.*" - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" - diff --git a/.gitignore b/.gitignore index 8031540..7c1c172 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,5 @@ gen/ /.idea/compiler.xml /.idea/jarRepositories.xml /.idea/inspectionProfiles/Project_Default.xml +/.idea/material_theme_project_new.xml +/.idea/vcs.xml diff --git a/build.gradle.kts b/build.gradle.kts index bcc0d04..af6f638 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,14 +7,16 @@ plugins { jacoco `java-library` signing - id("org.sonarqube") version "4.4.1.3373" + id("org.sonarqube") version "5.0.0.4638" id("org.cadixdev.licenser") version "0.6.1" id("me.qoomon.git-versioning") version "6.4.3" - id("io.freefair.lombok") version "8.4" - id("com.github.ben-manes.versions") version "0.50.0" + id("io.freefair.lombok") version "8.6" + id("io.freefair.javadoc-links") version "8.6" + id("io.freefair.javadoc-utf-8") version "8.6" + id("com.github.ben-manes.versions") version "0.51.0" id("me.champeau.jmh") version "0.7.2" - id("io.freefair.maven-central.validate-poms") version "8.4" - id("ru.vyarus.pom") version "2.2.2" + id("io.freefair.maven-central.validate-poms") version "8.6" + id("ru.vyarus.pom") version "3.0.0" id("io.codearte.nexus-staging") version "0.30.0" } @@ -43,8 +45,8 @@ gitVersioning.apply { val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG dependencies { - implementation("io.github.1c-syntax", "bsl-parser-core", "0.1.0") - implementation("com.tunnelvisionlabs", "antlr4", "4.9.0") + implementation("io.github.1c-syntax", "bsl-parser-core", "0.2.0") + implementation("org.antlr", "antlr4", "4.13.1") implementation("commons-io", "commons-io", "2.15.1") implementation("org.junit.jupiter", "junit-jupiter-api", "5.10.1") implementation("org.assertj", "assertj-core", "3.25.0") @@ -62,6 +64,7 @@ java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 withSourcesJar() + withJavadocJar() } tasks.withType { @@ -114,6 +117,7 @@ sonar { artifacts { archives(tasks["jar"]) archives(tasks["sourcesJar"]) + archives(tasks["javadocJar"]) } signing { diff --git a/src/main/java/com/github/_1c_syntax/bsl/parser/testing/TestLexer.java b/src/main/java/com/github/_1c_syntax/bsl/parser/testing/TestLexer.java index 1ded2ba..523b52a 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/parser/testing/TestLexer.java +++ b/src/main/java/com/github/_1c_syntax/bsl/parser/testing/TestLexer.java @@ -21,7 +21,6 @@ */ package com.github._1c_syntax.bsl.parser.testing; -import com.github._1c_syntax.bsl.parser.CaseChangingCharStream; import com.github._1c_syntax.bsl.parser.UnicodeBOMInputStream; import lombok.Getter; import lombok.SneakyThrows; @@ -96,8 +95,7 @@ public CommonTokenStream getTokensStream(int mode, String inputString) { var inputStreamReader = new InputStreamReader(ubis, StandardCharsets.UTF_8) ) { ubis.skipBOM(); - var inputTemp = CharStreams.fromReader(inputStreamReader); - input = new CaseChangingCharStream(inputTemp); + input = CharStreams.fromReader(inputStreamReader); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyLexer.java b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyLexer.java index 67e25b6..278a64c 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyLexer.java +++ b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyLexer.java @@ -23,6 +23,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.atn.ATN; public class DemoEmptyLexer extends Lexer { @@ -39,4 +40,9 @@ public String[] getRuleNames() { public String getGrammarFileName() { return null; } + + @Override + public ATN getATN() { + return null; + } } diff --git a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyParser.java b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyParser.java index 9132c84..0f5400f 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyParser.java +++ b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoEmptyParser.java @@ -23,6 +23,7 @@ import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.atn.ATN; public class DemoEmptyParser extends Parser { @@ -45,4 +46,9 @@ public String[] getRuleNames() { public String getGrammarFileName() { return null; } + + @Override + public ATN getATN() { + return null; + } } diff --git a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoLexer.java b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoLexer.java index dcadcfb..0990747 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoLexer.java +++ b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoLexer.java @@ -23,6 +23,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.atn.ATN; public class DemoLexer extends Lexer { @@ -44,4 +45,9 @@ public String[] getTokenNames() { public String getGrammarFileName() { return null; } + + @Override + public ATN getATN() { + return null; + } } \ No newline at end of file diff --git a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoParser.java b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoParser.java index 7701135..1433d49 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoParser.java +++ b/src/test/java/com/github/_1c_syntax/bsl/parser/testing/demo/DemoParser.java @@ -24,8 +24,8 @@ import com.github._1c_syntax.bsl.parser.BSLParserRuleContext; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.RecognitionException; -import org.antlr.v4.runtime.RuleVersion; import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.atn.ATN; import org.antlr.v4.runtime.tree.ParseTree; import java.util.Collections; @@ -55,17 +55,20 @@ public String getGrammarFileName() { return null; } + @Override + public ATN getATN() { + return null; + } + @Override public void reset() { // no op } - @RuleVersion(0) public final BSLParserRuleContext rule1() throws RecognitionException { return new DemoRuleContext(0, new DemoRuleContext(1), new DemoRuleContext(1), new DemoRuleContext(2)); } - @RuleVersion(0) public final BSLParserRuleContext rule2() throws RecognitionException { return new DemoRuleContext(1); }