diff --git a/.ci/ci.sh b/.ci/ci.sh
deleted file mode 100755
index 14af644..0000000
--- a/.ci/ci.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-# Do the Gradle build
-./gradlew build || exit 1
-
-if [ "$TRAVIS_REPO_SLUG" == "diffplug/freshmark" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
- # Publish the artifacts
- ./gradlew publish || exit 1
- # Push the javadoc
- ./.ci/push-javadoc.sh
-fi
diff --git a/.ci/push-javadoc.sh b/.ci/push-javadoc.sh
deleted file mode 100755
index f5e73d5..0000000
--- a/.ci/push-javadoc.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-echo "Pushing javadoc to gh-pages..."
-
-# save the version
-VERSION=$(./gradlew -q printVersion)
-
-# copy javadoc from the build to ~/javadoc-temp
-cp -R build/docs/javadoc $HOME/javadoc-temp
-
-# clone a new copy durian-rx to gh-pages
-cd $HOME
-git config --global user.email "travis@travis-ci.org"
-git config --global user.name "travis-ci"
-rm -rf $HOME/gh-pages
-git clone --quiet --branch=gh-pages https://${gh_token}@github.com/diffplug/freshmark gh-pages > /dev/null
-
-# copy the javadoc into the build
-cd gh-pages
-mkdir -p javadoc
-if [[ "$VERSION" != *SNAPSHOT* ]]; then
- git rm -rf javadoc/${VERSION}
- cp -Rf $HOME/javadoc-temp/ ./javadoc/${VERSION}/
-else
- git rm -rf javadoc/snapshot
- cp -Rf $HOME/javadoc-temp/ ./javadoc/snapshot/
-fi
-
-# add all of the stuff and commit it
-git add -f -A
-git commit -m "Lastest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
-if ! git push -fq origin gh-pages &> /dev/null; then
- echo "Error pushing javadoc to origin. Bad gh_token? GitHub down?"
- exit 1
-else
- echo "Pushed javadoc to gh-pages."
-fi
diff --git a/.github/workflows/changelog-print.yml b/.github/workflows/changelog-print.yml
new file mode 100644
index 0000000..a3009e3
--- /dev/null
+++ b/.github/workflows/changelog-print.yml
@@ -0,0 +1,22 @@
+name: changelogPrint
+
+on:
+ push:
+ branches: [main]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: changelogPrint
+ steps:
+ - uses: actions/checkout@v3
+ - name: jdk 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: 11
+ distribution: 'temurin'
+ - name: gradle caching
+ uses: gradle/gradle-build-action@v2
+ with:
+ gradle-home-cache-cleanup: true
+ - run: ./gradlew changelogPrint
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..a3d5d18
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,40 @@
+on:
+ pull_request:
+ push:
+ branches: [main]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+jobs:
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ jre: [11, 17]
+ os: [ubuntu-latest]
+ include:
+ - jre: 17
+ os: windows-latest
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Install JDK ${{ matrix.jre }}
+ uses: actions/setup-java@v3
+ with:
+ distribution: "temurin"
+ java-version: ${{ matrix.jre }}
+ - name: gradle caching
+ uses: gradle/gradle-build-action@v2
+ with:
+ gradle-home-cache-cleanup: true
+ - name: git fetch origin main
+ run: git fetch origin main
+ - name: gradlew build
+ run: ./gradlew build
+ - name: junit result
+ uses: mikepenz/action-junit-report@v3
+ if: always() # always run even if the previous step fails
+ with:
+ check_name: JUnit ${{ matrix.jre }} ${{ matrix.os }}
+ report_paths: '*/build/test-results/*/TEST-*.xml'
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..3d95da7
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,51 @@
+# GH_TOKEN
+# NEXUS_USER
+# NEXUS_PASS64 (base64 NOTE: `base64` and `openssl base64` failed, had to use Java
+# byte[] data = "{{password}}".getBytes(StandardCharsets.UTF_8);
+# String encoded = new String(Base64.getEncoder().encode(data), StandardCharsets.UTF_8);
+# System.out.println(encoded);
+# GPG_PASSPHRASE
+# GPG_KEY64 (base64)
+# gpg --export-secret-keys --armor KEY_ID | openssl base64 | pbcopy
+# GRADLE_KEY
+# GRADLE_SECRET
+
+name: deploy
+on:
+ workflow_dispatch:
+ inputs:
+ to_publish:
+ description: 'What to publish'
+ required: true
+ default: 'all'
+ type: choice
+ options:
+ - all
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: deploy
+ env:
+ gh_token: ${{ secrets.GH_TOKEN }}
+ ORG_GRADLE_PROJECT_nexus_user: ${{ secrets.NEXUS_USER }}
+ ORG_GRADLE_PROJECT_nexus_pass64: ${{ secrets.NEXUS_PASS64 }}
+ ORG_GRADLE_PROJECT_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
+ ORG_GRADLE_PROJECT_gpg_key64: ${{ secrets.GPG_KEY64 }}
+ steps:
+ - uses: actions/checkout@v3
+ - name: jdk 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: 11
+ distribution: 'temurin'
+ - name: gradle caching
+ uses: gradle/gradle-build-action@v2
+ with:
+ gradle-home-cache-cleanup: true
+ - name: git fetch origin main
+ run: git fetch origin main
+ - name: publish all
+ if: "${{ github.event.inputs.to_publish == 'all' }}"
+ run: |
+ ./gradlew :changelogPush -Prelease=true -Penable_publishing=true -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_SECRET }} --stacktrace --warning-mode all
diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml
new file mode 100644
index 0000000..2c02ce0
--- /dev/null
+++ b/.github/workflows/gradle-wrapper-validation.yml
@@ -0,0 +1,23 @@
+name: "Validate Gradle Wrapper"
+on:
+ push:
+ paths:
+ - 'gradlew'
+ - 'gradlew.bat'
+ - 'gradle/wrapper/'
+ pull_request:
+ paths:
+ - 'gradlew'
+ - 'gradlew.bat'
+ - 'gradle/wrapper/'
+
+permissions:
+ contents: read
+
+jobs:
+ validation:
+ name: "Validation"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: gradle/wrapper-validation-action@v1
diff --git a/.gitignore b/.gitignore
index f66f34c..69dd97c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,6 @@ build/
.classpath
.settings/
bin/
+
+# IntelliJ
+.idea/
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..22e5245
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,16 @@
+# FreshMark releases
+
+## [Unreleased]
+
+## [1.3.1] - 2016-08-16
+
+- Updated dependencies.
+
+## [1.3.0] - 2015-09-22
+
+- Added a console interface.
+- Improved line numbers for error reporting.
+
+## [1.2.0] - 2015-09-21
+
+- First stable release.
diff --git a/CHANGES.md b/CHANGES.md
deleted file mode 100644
index c12ae22..0000000
--- a/CHANGES.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# FreshMark releases
-
-### Version 1.4.0 - TBD ([javadoc](http://diffplug.github.io/freshmark/javadoc/snapshot/))
-
-### Version 1.3.1 - August 16th 2016 ([javadoc](http://diffplug.github.io/freshmark/javadoc/1.3.1/), [jcenter](https://bintray.com/diffplug/opensource/freshmark/1.3.1/view))
-
-* Updated dependencies.
-
-### Version 1.3.0 - September 22nd 2015 ([javadoc](http://diffplug.github.io/freshmark/javadoc/1.3.0/), [jcenter](https://bintray.com/diffplug/opensource/freshmark/1.3.0/view))
-
-* Added a console interface.
-* Improved line numbers for error reporting.
-
-### Version 1.2.0 - September 21st 2015 ([javadoc](http://diffplug.github.io/freshmark/javadoc/1.2.0/), [jcenter](https://bintray.com/diffplug/opensource/freshmark/1.2.0/view))
-
-* First stable release.
diff --git a/build.gradle b/build.gradle
index e41f77c..42eb57e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,233 +1,26 @@
plugins {
- // code formatting
- id "com.diffplug.gradle.spotless" version "1.3.0"
- // bintray uploading
- id "com.jfrog.bintray" version "1.3.1"
+ id 'com.diffplug.blowdryer'
+ id 'com.diffplug.spotless-changelog'
}
repositories {
mavenCentral()
- // SNAPSHOT versions are free to rely on other SNAPSHOT libraries
- if (project.version.endsWith('-SNAPSHOT')) {
- maven {
- url 'https://oss.sonatype.org/content/repositories/snapshots/'
- }
- configurations.all {
- resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
- }
- }
-}
-
-//////////
-// JAVA //
-//////////
-apply plugin: 'java'
-sourceCompatibility = VER_JAVA
-targetCompatibility = VER_JAVA
-
-dependencies {
- compile "com.diffplug.jscriptbox:jscriptbox:${VER_JSCRIPTBOX}"
- compile "com.diffplug.durian:durian-core:${VER_DURIAN}"
- compile "args4j:args4j:${VER_ARGS4J}"
- testCompile "junit:junit:${VER_JUNIT}"
-}
-
-/////////////
-// ECLIPSE //
-/////////////
-apply plugin: 'eclipse'
-eclipse {
- classpath {
- downloadSources true
- downloadJavadoc true
- }
- jdt {
- sourceCompatibility VER_JAVA
- targetCompatibility VER_JAVA
- }
}
-// always create fresh projects
-tasks.eclipse.dependsOn(cleanEclipse)
-////////////
-// FORMAT //
-////////////
-apply plugin: 'com.diffplug.gradle.spotless'
-spotless {
- java {
- licenseHeaderFile 'spotless.license.java' // License header file
- importOrderFile 'spotless.importorder' // An import ordering file, exported from Eclipse
- eclipseFormatFile 'spotless.eclipseformat.xml' // XML file dumped out by the Eclipse formatter
- // Eclipse formatter puts excess whitespace after lambda blocks
- // funcThatTakesLambdas(x -> {} , y -> {} ) // what Eclipse does
- // funcThatTakesLambdas(x -> {}, y -> {}) // what I wish Eclipse did
- custom 'Lambda fix', { it.replace('} )', '})').replace('} ,', '},') }
- }
- format 'misc', {
- target '**/.gitignore', '**/*.gradle', '**/*.md', '**/*.sh'
- indentWithTabs()
- trimTrailingWhitespace()
- endWithNewline()
- }
- freshmark {}
-}
+apply from: 干.file('spotless/java.gradle')
+apply from: 干.file('spotless/freshmark.gradle')
+apply from: 干.file('base/java.gradle')
+apply plugin: 'java-library'
-//////////////
-// FINDBUGS //
-//////////////
-apply plugin: 'findbugs'
-findbugs {
- toolVersion = VER_FINDBUGS
- sourceSets = [sourceSets.main] // don't check the test code
- ignoreFailures = false // bug free or it doesn't ship!
- reportsDir = file('build/findbugs')
- effort = 'max' // min|default|max
- reportLevel = 'low' // low|medium|high (low = sensitive to even minor mistakes)
- omitVisitors = [] // bugs that we want to ignore
-}
-// HTML instead of XML
-tasks.withType(FindBugs) {
- reports {
- xml.enabled = false
- html.enabled = true
- }
-}
-// we'll want the findbugs annotations (they don't have a 3.0.1 version)
dependencies {
- compile 'com.google.code.findbugs:annotations:3.0.0'
- compile 'com.google.code.findbugs:jsr305:3.0.0'
-}
-
-///////////
-// MAVEN //
-///////////
-apply plugin: 'maven-publish'
-
-task sourcesJar(type: Jar) {
- classifier = 'sources'
- from sourceSets.main.allJava
-}
-
-// Where it's possible to name parameters and methods clearly enough
-// that javadoc is not necessary, why make the code bigger?
-//
-// Thus, no javadoc warnings.
-def makeLink = { url, text -> "${text}" }
-def javadocInfo = '
' + makeLink("https://github.com/${org}/${name}", "${group}:${name}:${version}") +
-' by ' + makeLink('http://www.diffplug.com', 'DiffPlug') + '
'
-javadoc {
- options.addStringOption('Xdoclint:none', '-quiet')
- options.header javadocInfo
- options.footer javadocInfo
- options.links('https://diffplug.github.io/durian/javadoc/' + (VER_DURIAN.endsWith('-SNAPSHOT') ? 'snapshot' : VER_DURIAN) + '/')
- options.links('https://docs.oracle.com/javase/8/docs/api/')
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-task freshmarkConsole(type: JavaExec, dependsOn: classes) {
- description = 'Runs the FreshMark console'
- classpath = sourceSets.main.runtimeClasspath
- main = 'com.diffplug.freshmark.FreshMarkConsole'
- if (project.hasProperty('args')) {
- args project.args.split('\\s+')
- }
-}
-
-////////////////
-// PUBLISHING //
-////////////////
-def isSnapshot = project.version.endsWith('-SNAPSHOT')
-// pulls the credentials from either the environment variable or gradle.properties
-def cred = {
- if (System.env[it] != null) {
- return System.env[it]
- } else if (project.hasProperty(it)) {
- return project[it]
- } else {
- return 'unknown_' + it
+ implementation 'com.diffplug.jscriptbox:jscriptbox:3.0.0'
+ implementation 'com.diffplug.durian:durian-core:1.2.0'
+ implementation 'args4j:args4j:2.33'
+ testImplementation 'junit:junit:4.13.2'
+ if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_15)) {
+ testImplementation 'org.openjdk.nashorn:nashorn-core:15.4'
}
}
-publishing {
- publications {
- mavenJava(MavenPublication) {
- from components.java
- artifact sourcesJar
- artifact javadocJar
- pom.withXml {
- // findbugs annotations should have scope "provided"
- asNode().dependencies.'*'.findAll() { it.groupId.text() == 'com.google.code.findbugs' }.each() { it.scope*.value = 'provided' }
- // add MavenCentral requirements to the POM
- asNode().children().last() + {
- resolveStrategy = Closure.DELEGATE_FIRST
- name project.name
- description project.description
- url "https://github.com/${project.org}/${project.name}"
- scm {
- url "https://github.com/${project.org}/${project.name}"
- connection "scm:git:git://github.com/${project.org}/${project.name}"
- developerConnection "scm:git:ssh:git@github.com/${project.org}/${project.name}"
- }
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/license/LICENSE-2.0.txt'
- distribution 'repo'
- }
- }
- developers {
- developer {
- id 'nedtwigg'
- name 'Ned Twigg'
- email 'ned.twigg@diffplug.com'
- }
- }
- }
- }
- }
- }
- if (isSnapshot) {
- // upload snapshots to oss.sonatype.org
- repositories { maven {
- url = 'https://oss.sonatype.org/content/repositories/snapshots'
- credentials {
- username = cred('nexus_user')
- password = cred('nexus_pass')
- }
- } }
- }
-}
-
-if (!isSnapshot) {
- // upload releases to bintray and then mavenCentral
- bintray {
- user = cred('bintray_user')
- key = cred('bintray_pass')
- publications = ['mavenJava']
- publish = true
- pkg {
- repo = 'opensource'
- name = project.name
- userOrg = project.org
- version {
- name = project.version
- mavenCentralSync {
- user = cred('nexus_user')
- password = cred('nexus_pass')
- }
- }
- }
- }
-
- publish.dependsOn(bintrayUpload)
- bintrayUpload.dependsOn(['generatePomFileForMavenJavaPublication', jar, sourcesJar, javadocJar])
-}
-
-// helps external scripts detect version
-task printVersion << {
- println version
-}
+apply from: 干.file('base/maven.gradle')
+apply from: 干.file('base/sonatype.gradle')
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 6607711..57e0b56 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,18 +1,8 @@
-stable=1.3.1
-version=1.4.0-SNAPSHOT
-name=freshmark
-group=com.diffplug.freshmark
-description=FreshMark - Keep your markdown fresh
-org=diffplug
+git_url=github.com/diffplug/freshmark
+maven_group=com.diffplug.freshmark
+maven_name=freshmark
+maven_desc=FreshMark - Keep your markdown fresh
+license=apache
-# Build requirements
-VER_JAVA=1.8
-VER_FINDBUGS=3.0.1
-
-# Dependencies
-VER_JSCRIPTBOX=3.0.0
-VER_DURIAN=1.2.0
-VER_ARGS4J=2.33
-
-# Testing
-VER_JUNIT=4.12
+ver_java=8
+javadoc_links=
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index d3b8398..3baa851 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 4b68c66..f6181cb 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue Aug 16 02:55:47 PDT 2016
+#Sat Feb 04 22:28:20 PST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
diff --git a/gradlew.bat b/gradlew.bat
index 832fdb6..f6d5974 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,90 +1,90 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..cf930d2
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,30 @@
+pluginManagement {
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+plugins {
+ // https://github.com/diffplug/blowdryer/blob/main/CHANGELOG.md
+ id 'com.diffplug.blowdryerSetup' version '1.7.0'
+ // https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md
+ id 'com.diffplug.spotless' version '6.14.0' apply false
+ // https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
+ id 'com.diffplug.spotless-changelog' version '2.4.1' apply false
+ // https://plugins.gradle.org/plugin/com.gradle.plugin-publish
+ id 'com.gradle.plugin-publish' version '1.1.0' apply false
+ // https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md
+ id 'dev.equo.ide' version '0.12.1' apply false
+ // https://github.com/gradle-nexus/publish-plugin/releases
+ id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' apply false
+}
+
+blowdryerSetup {
+ github 'diffplug/blowdryer-diffplug', 'tag', '7.0.0'
+ //devLocal '../blowdryer-diffplug'
+ setPluginsBlockTo {
+ it.file 'plugin.versions'
+ }
+}
+
+rootProject.name = 'freshmark'
diff --git a/spotless.eclipseformat.xml b/spotless.eclipseformat.xml
deleted file mode 100644
index 613e633..0000000
--- a/spotless.eclipseformat.xml
+++ /dev/null
@@ -1,295 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spotless.importorder b/spotless.importorder
deleted file mode 100644
index 77b3528..0000000
--- a/spotless.importorder
+++ /dev/null
@@ -1,7 +0,0 @@
-#Organize Import Order
-#Fri Apr 24 02:36:28 PDT 2015
-4=com.diffplug
-3=com
-2=org
-1=javax
-0=java
diff --git a/spotless.license.java b/spotless.license.java
deleted file mode 100644
index ab22092..0000000
--- a/spotless.license.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright 2015 DiffPlug
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
\ No newline at end of file
diff --git a/src/main/java/com/diffplug/freshmark/FreshMarkConsole.java b/src/main/java/com/diffplug/freshmark/FreshMarkConsole.java
index bfb8d57..03ae81c 100644
--- a/src/main/java/com/diffplug/freshmark/FreshMarkConsole.java
+++ b/src/main/java/com/diffplug/freshmark/FreshMarkConsole.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2015 DiffPlug
+ * Copyright (C) 2015-2023 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,13 +28,10 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
-
import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.spi.MapOptionHandler;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
public class FreshMarkConsole {
/** Prints the usage for the given command. */
public static void printUsage(String name, CmdLineParser parser, PrintStream stream) {
@@ -75,7 +72,6 @@ public boolean isWin() {
private static final Charset CHARSET = StandardCharsets.UTF_8;
- @SuppressFBWarnings(value = {"REC_CATCH_EXCEPTION", "UR_UNINIT_READ"}, justification = "we don't want to bother the console user with stacktraces, and fields are set by args4j magic")
public FreshMarkConsole(String[] args) {
CmdLineParser parser = new CmdLineParser(this);
try {