Moved from Gradle to bld
This commit is contained in:
parent
5df56b7820
commit
630b57b604
108 changed files with 447 additions and 786 deletions
35
.github/workflows/bld.yml
vendored
Normal file
35
.github/workflows/bld.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
name: bld-ci
|
||||||
|
|
||||||
|
on: [ push, pull_request, workflow_dispatch ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-gradle-project:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java-version: [ 17, 19, 20 ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout source repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up JDK ${{ matrix.java-version }}
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'zulu'
|
||||||
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
|
- name: Grant execute permission for bld
|
||||||
|
run: chmod +x bld
|
||||||
|
|
||||||
|
- name: Download the dependencies
|
||||||
|
run: ./bld download
|
||||||
|
|
||||||
|
- name: Run tests with bld
|
||||||
|
run: >-
|
||||||
|
./bld compile test
|
||||||
|
-DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/rife2-renderers
|
||||||
|
-DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
38
.github/workflows/gradle.yml
vendored
38
.github/workflows/gradle.yml
vendored
|
@ -1,38 +0,0 @@
|
||||||
name: gradle-ci
|
|
||||||
|
|
||||||
on: [ push, pull_request, workflow_dispatch ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-gradle-project:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
env:
|
|
||||||
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
java-version: [ 17, 19 ]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout source repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: ${{ matrix.java-version }}
|
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
|
|
||||||
- name: Set up NO_CI env
|
|
||||||
if: matrix.java-version != 17
|
|
||||||
run: echo "NO_CI=true" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Test with Gradle
|
|
||||||
uses: gradle/gradle-build-action@v2
|
|
||||||
with:
|
|
||||||
arguments: build check --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
|
18
.github/workflows/pages.yml
vendored
18
.github/workflows/pages.yml
vendored
|
@ -28,28 +28,20 @@ jobs:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
env:
|
|
||||||
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK 19
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'zulu'
|
||||||
java-version: 19
|
java-version: 17
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
|
|
||||||
- name: Build Javadocs
|
- name: Build Javadocs
|
||||||
uses: gradle/gradle-build-action@v2
|
run: ./bld download clean javadoc
|
||||||
with:
|
|
||||||
arguments: clean javadoc
|
|
||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v3
|
uses: actions/configure-pages@v3
|
||||||
|
@ -58,7 +50,7 @@ jobs:
|
||||||
uses: actions/upload-pages-artifact@v1
|
uses: actions/upload-pages-artifact@v1
|
||||||
with:
|
with:
|
||||||
# Upload generated Javadocs repository
|
# Upload generated Javadocs repository
|
||||||
path: 'lib/build/docs/javadoc/'
|
path: 'build/javadoc/'
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
|
|
24
.github/workflows/publish.yml
vendored
24
.github/workflows/publish.yml
vendored
|
@ -9,9 +9,6 @@ jobs:
|
||||||
build-gradle-project:
|
build-gradle-project:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
env:
|
|
||||||
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -24,17 +21,14 @@ jobs:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for bld
|
||||||
run: chmod +x gradlew
|
run: chmod +x bld
|
||||||
|
|
||||||
- name: Publish with Gradle
|
- name: Download the dependencies
|
||||||
uses: gradle/gradle-build-action@v2
|
run: ./bld download
|
||||||
env:
|
|
||||||
NO_CI: true
|
|
||||||
SONATYPE_USER: ${{ secrets.SONATYPE_USER}}
|
|
||||||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
|
|
||||||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
|
|
||||||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
|
|
||||||
with:
|
|
||||||
arguments: build check publish --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
|
||||||
|
|
||||||
|
- name: Publish with bld
|
||||||
|
run: >-
|
||||||
|
./bld compile test publish
|
||||||
|
-DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/rife2-renderers
|
||||||
|
-DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
||||||
|
|
135
.gitignore
vendored
135
.gitignore
vendored
|
@ -1,84 +1,55 @@
|
||||||
!.vscode/extensions.json
|
|
||||||
!.vscode/launch.json
|
|
||||||
!.vscode/settings.json
|
|
||||||
!.vscode/tasks.json
|
|
||||||
*.class
|
|
||||||
*.code-workspace
|
|
||||||
*.ctxt
|
|
||||||
*.iws
|
|
||||||
*.log
|
|
||||||
*.nar
|
|
||||||
*.rar
|
|
||||||
*.sublime-*
|
|
||||||
*.tar.gz
|
|
||||||
*.zip
|
|
||||||
.DS_Store
|
|
||||||
.classpath
|
|
||||||
.gradle
|
.gradle
|
||||||
.history
|
.DS_Store
|
||||||
.kobalt
|
build
|
||||||
.mtj.tmp/
|
lib/bld/**
|
||||||
.mvn/timing.properties
|
lib/compile/**
|
||||||
.mvn/wrapper/maven-wrapper.jar
|
lib/runtime/**
|
||||||
.nb-gradle
|
lib/standalone/**
|
||||||
.project
|
lib/test/**
|
||||||
.scannerwork
|
!bld-wrapper.jar
|
||||||
.settings
|
!bld-wrapper.properties
|
||||||
.vscode/*
|
|
||||||
/**/.idea/$CACHE_FILE$
|
# IDEA ignores
|
||||||
/**/.idea/$PRODUCT_WORKSPACE_FILE$
|
|
||||||
/**/.idea/**/caches/build_file_checksums.ser
|
# User-specific
|
||||||
/**/.idea/**/contentModel.xml
|
.idea/**/workspace.xml
|
||||||
/**/.idea/**/dataSources.ids
|
.idea/**/tasks.xml
|
||||||
/**/.idea/**/dataSources.local.xml
|
.idea/**/usage.statistics.xml
|
||||||
/**/.idea/**/dataSources/
|
.idea/**/dictionaries
|
||||||
/**/.idea/**/dbnavigator.xml
|
.idea/**/shelf
|
||||||
/**/.idea/**/dictionaries
|
|
||||||
/**/.idea/**/dynamic.xml
|
# AWS User-specific
|
||||||
/**/.idea/**/gradle.xml
|
.idea/**/aws.xml
|
||||||
/**/.idea/**/httpRequests
|
|
||||||
/**/.idea/**/libraries
|
# Generated files
|
||||||
/**/.idea/**/mongoSettings.xml
|
.idea/**/contentModel.xml
|
||||||
/**/.idea/**/replstate.xml
|
|
||||||
/**/.idea/**/shelf/
|
# Sensitive or high-churn files
|
||||||
/**/.idea/**/sqlDataSources.xml
|
.idea/**/dataSources/
|
||||||
/**/.idea/**/tasks.xml
|
.idea/**/dataSources.ids
|
||||||
/**/.idea/**/uiDesigner.xml
|
.idea/**/dataSources.local.xml
|
||||||
/**/.idea/**/usage.statistics.xml
|
.idea/**/sqlDataSources.xml
|
||||||
/**/.idea/**/workspace.xml
|
.idea/**/dynamic.xml
|
||||||
/**/.idea/sonarlint*
|
.idea/**/uiDesigner.xml
|
||||||
/**/.idea_modules/
|
.idea/**/dbnavigator.xml
|
||||||
Thumbs.db
|
|
||||||
__pycache__
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
atlassian-ide-plugin.xml
|
atlassian-ide-plugin.xml
|
||||||
bin/
|
|
||||||
build/
|
# Cursive Clojure plugin
|
||||||
cmake-build-*/
|
.idea/replstate.xml
|
||||||
com_crashlytics_export_strings.xml
|
|
||||||
crashlytics-build.properties
|
# SonarLint plugin
|
||||||
crashlytics.properties
|
.idea/sonarlint/
|
||||||
dependency-reduced-pom.xml
|
|
||||||
deploy/
|
# Editor-based Rest Client
|
||||||
dist/
|
.idea/httpRequests
|
||||||
ehthumbs.db
|
|
||||||
fabric.properties
|
|
||||||
gen/
|
|
||||||
gradle.properties
|
|
||||||
hs_err_pid*
|
|
||||||
kobaltBuild
|
|
||||||
kobaltw*-test
|
|
||||||
lib/kotlin*
|
|
||||||
libs/
|
|
||||||
local.properties
|
|
||||||
out/
|
|
||||||
pom.xml.asc
|
|
||||||
pom.xml.next
|
|
||||||
pom.xml.releaseBackup
|
|
||||||
pom.xml.tag
|
|
||||||
pom.xml.versionsBackup
|
|
||||||
proguard-project.txt
|
|
||||||
project.properties
|
|
||||||
release.properties
|
|
||||||
target/
|
|
||||||
test-output
|
|
||||||
venv
|
|
3
.idea/.gitignore
generated
vendored
3
.idea/.gitignore
generated
vendored
|
@ -1,3 +0,0 @@
|
||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
37
.idea/app.iml
generated
Normal file
37
.idea/app.iml
generated
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file://$MODULE_DIR$/build/main" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/build/test" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/src/main/resources/templates" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module-library" scope="RUNTIME">
|
||||||
|
<library>
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$MODULE_DIR$/src/main/resources/templates" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="library" name="compile" level="project" />
|
||||||
|
<orderEntry type="library" scope="RUNTIME" name="runtime" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="test" level="project" />
|
||||||
|
<orderEntry type="module-library" scope="TEST">
|
||||||
|
<library>
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$MODULE_DIR$/src/test/resources/templates" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
</component>
|
||||||
|
</module>
|
14
.idea/bld.iml
generated
Normal file
14
.idea/bld.iml
generated
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file://$MODULE_DIR$/build/bld" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/build/bld" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$/src/bld">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/bld/java" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="bld" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/compiler.xml
generated
6
.idea/compiler.xml
generated
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CompilerConfiguration">
|
|
||||||
<bytecodeTargetLevel target="17" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
30
.idea/jarRepositories.xml
generated
30
.idea/jarRepositories.xml
generated
|
@ -1,30 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Maven Central repository" />
|
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="jboss.community" />
|
|
||||||
<option name="name" value="JBoss Community repository" />
|
|
||||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="MavenRepo" />
|
|
||||||
<option name="name" value="MavenRepo" />
|
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="maven" />
|
|
||||||
<option name="name" value="maven" />
|
|
||||||
<option name="url" value="https://s01.oss.sonatype.org/content/repositories/snapshots" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="MavenLocal" />
|
|
||||||
<option name="name" value="MavenLocal" />
|
|
||||||
<option name="url" value="file:$PROJECT_DIR$/../../maven/repository/" />
|
|
||||||
</remote-repository>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
17
.idea/libraries/bld.xml
generated
Normal file
17
.idea/libraries/bld.xml
generated
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<component name="libraryTable">
|
||||||
|
<library name="bld">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
|
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.18.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.18-sources.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
<excluded>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
</excluded>
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" type="SOURCES" />
|
||||||
|
</library>
|
||||||
|
</component>
|
13
.idea/libraries/compile.xml
generated
Normal file
13
.idea/libraries/compile.xml
generated
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<component name="libraryTable">
|
||||||
|
<library name="compile">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
|
</SOURCES>
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
|
||||||
|
</library>
|
||||||
|
</component>
|
13
.idea/libraries/runtime.xml
generated
Normal file
13
.idea/libraries/runtime.xml
generated
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<component name="libraryTable">
|
||||||
|
<library name="runtime">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||||
|
</SOURCES>
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
|
||||||
|
</library>
|
||||||
|
</component>
|
13
.idea/libraries/test.xml
generated
Normal file
13
.idea/libraries/test.xml
generated
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<component name="libraryTable">
|
||||||
|
<library name="test">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
|
</SOURCES>
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
|
||||||
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
|
||||||
|
</library>
|
||||||
|
</component>
|
54
.idea/misc.xml
generated
54
.idea/misc.xml
generated
|
@ -1,57 +1,9 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="EntryPointsManager">
|
|
||||||
<pattern value="rife2.render.Capitalize" />
|
|
||||||
<pattern value="rife2.render.Lowercase" />
|
|
||||||
<pattern value="rife2.render.SwapCase" />
|
|
||||||
<pattern value="rife2.render.Trim" />
|
|
||||||
<pattern value="rife2.render.Uncapitalize" />
|
|
||||||
<pattern value="rife2.render.Uppercase" />
|
|
||||||
<pattern value="rife2.render.EncodeHtml" />
|
|
||||||
<pattern value="rife2.render.EncodeJson" />
|
|
||||||
<pattern value="rife2.render.EncodeUrl" />
|
|
||||||
<pattern value="rife2.render.EncodeXml" />
|
|
||||||
<pattern value="rife2.render.EncodeQp" />
|
|
||||||
<pattern value="rife2.render.EncodeHtmlEntities" />
|
|
||||||
<pattern value="rife2.render.Rot13" />
|
|
||||||
<pattern value="rife2.render.Year" />
|
|
||||||
<pattern value="rife2.render.EncodeBase64" />
|
|
||||||
<pattern value="rife2.render.EncodeUnicode" />
|
|
||||||
<pattern value="rife.render.Capitalize" />
|
|
||||||
<pattern value="rife.render.EncodeBase64" />
|
|
||||||
<pattern value="rife.render.EncodeHtml" />
|
|
||||||
<pattern value="rife.render.EncodeHtmlEntities" />
|
|
||||||
<pattern value="rife.render.EncodeJson" />
|
|
||||||
<pattern value="rife.render.EncodeQp" />
|
|
||||||
<pattern value="rife.render.EncodeUnicode" />
|
|
||||||
<pattern value="rife.render.EncodeUrl" />
|
|
||||||
<pattern value="rife.render.EncodeXml" />
|
|
||||||
<pattern value="rife.render.ValueBean" method="getValue" />
|
|
||||||
<pattern value="rife.render.Lowercase" />
|
|
||||||
<pattern value="rife.render.Rot13" />
|
|
||||||
<pattern value="rife.render.SwapCase" />
|
|
||||||
<pattern value="rife.render.TestDateTime" />
|
|
||||||
<pattern value="rife.render.TestEncode" />
|
|
||||||
<pattern value="rife.render.Trim" />
|
|
||||||
<pattern value="rife.render.Uncapitalize" />
|
|
||||||
<pattern value="rife.render.Uppercase" />
|
|
||||||
<pattern value="rife.render.Year" />
|
|
||||||
<pattern value="rife.render.ValueBean" method="setValue" />
|
|
||||||
<pattern value="rife.render.TestDateTime" method="testDateIso" />
|
|
||||||
<pattern value="rife.render.TestDateTime" method="testDateTimeIso" />
|
|
||||||
<pattern value="rife.render.TestDateTime" method="testDateTimeRfc2822" />
|
|
||||||
<pattern value="rife.render.TestEncode" method="testEncodeUrl" />
|
|
||||||
<pattern value="rife.render.TestDateTime" method="testTimeIso" />
|
|
||||||
<pattern value="rife.render.TestDateTime" method="testYear" />
|
|
||||||
<pattern value="rife.render.ValueBean" />
|
|
||||||
<pattern value="rife.render.RenderUtils" method="formatCreditCard" />
|
|
||||||
<pattern value="rife.render.RenderUtils" />
|
|
||||||
<pattern value="rife.render.RenderUtils" method="RenderUtils" />
|
|
||||||
<pattern value="rife.render.RenderUtils" method="toQuotedPrintable" />
|
|
||||||
</component>
|
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
||||||
<component name="PDMPlugin">
|
<component name="PDMPlugin">
|
||||||
<option name="skipTestSources" value="false" />
|
<option name="skipTestSources" value="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="19" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build" />
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
9
.idea/modules.xml
generated
Normal file
9
.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/app.iml" filepath="$PROJECT_DIR$/.idea/app.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/bld.iml" filepath="$PROJECT_DIR$/.idea/bld.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
9
.idea/runConfigurations/Run Main.xml
generated
Normal file
9
.idea/runConfigurations/Run Main.xml
generated
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Run Main" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="rife.render.TemplateRenderersMain" />
|
||||||
|
<module name="app" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
13
.idea/runConfigurations/Run Tests.xml
generated
Normal file
13
.idea/runConfigurations/Run Tests.xml
generated
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Run Tests" type="JUnit" factoryName="JUnit">
|
||||||
|
<module name="app" />
|
||||||
|
<option name="PACKAGE_NAME" value="moog" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="rife.render" />
|
||||||
|
<option name="METHOD_NAME" value="" />
|
||||||
|
<option name="TEST_OBJECT" value="directory" />
|
||||||
|
<dir value="$PROJECT_DIR$/src/test/java" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.vscode/launch.json
vendored
Normal file
24
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "Run Main",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "rife.render.TemplateRenderersMain"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "Run Tests",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "org.junit.platform.console.ConsoleLauncher",
|
||||||
|
"args": [
|
||||||
|
"--details=verbose",
|
||||||
|
"--scan-classpath",
|
||||||
|
"--disable-banner",
|
||||||
|
"--disable-ansi-colors",
|
||||||
|
"--exclude-engine=junit-platform-suite",
|
||||||
|
"--exclude-engine=junit-vintage"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
15
.vscode/settings.json
vendored
Normal file
15
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"java.project.sourcePaths": [
|
||||||
|
"src/main/java",
|
||||||
|
"src/main/resources",
|
||||||
|
"src/test/java",
|
||||||
|
"src/bld/java"
|
||||||
|
],
|
||||||
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
|
"java.project.referencedLibraries": [
|
||||||
|
"${HOME}/.rife2/dist/rife2-1.5.18.jar",
|
||||||
|
"lib/compile/*.jar",
|
||||||
|
"lib/runtime/*.jar",
|
||||||
|
"lib/test/*.jar"
|
||||||
|
]
|
||||||
|
}
|
2
bld
Executable file
2
bld
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
java -jar "$(dirname "$0")/lib/bld/bld-wrapper.jar" "$0" --build rife.render.TemplateRenderersBuild "$@"
|
4
bld.bat
Normal file
4
bld.bat
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
@echo off
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
java -jar "%DIRNAME%/lib/bld/bld-wrapper.jar" "%0" --build rife.render.TemplateRenderersBuild %*
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
6
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +0,0 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
|
||||||
networkTimeout=10000
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
|
244
gradlew
vendored
244
gradlew
vendored
|
@ -1,244 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright © 2015-2021 the original authors.
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
# 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,
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Gradle start up script for POSIX generated by Gradle.
|
|
||||||
#
|
|
||||||
# Important for running:
|
|
||||||
#
|
|
||||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
||||||
# noncompliant, but you have some other compliant shell such as ksh or
|
|
||||||
# bash, then to run this script, type that shell name before the whole
|
|
||||||
# command line, like:
|
|
||||||
#
|
|
||||||
# ksh Gradle
|
|
||||||
#
|
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
|
||||||
# requires all of these POSIX shell features:
|
|
||||||
# * functions;
|
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
|
||||||
#
|
|
||||||
# Important for patching:
|
|
||||||
#
|
|
||||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
||||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
||||||
#
|
|
||||||
# The "traditional" practice of packing multiple parameters into a
|
|
||||||
# space-separated string is a well documented source of bugs and security
|
|
||||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
||||||
# options in "$@", and eventually passing that to Java.
|
|
||||||
#
|
|
||||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
||||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
||||||
# see the in-line comments for details.
|
|
||||||
#
|
|
||||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
||||||
# Darwin, MinGW, and NonStop.
|
|
||||||
#
|
|
||||||
# (3) This script is generated from the Groovy template
|
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
||||||
# within the Gradle project.
|
|
||||||
#
|
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
app_path=$0
|
|
||||||
|
|
||||||
# Need this for daisy-chained symlinks.
|
|
||||||
while
|
|
||||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
|
||||||
[ -h "$app_path" ]
|
|
||||||
do
|
|
||||||
ls=$( ls -ld "$app_path" )
|
|
||||||
link=${ls#*' -> '}
|
|
||||||
case $link in #(
|
|
||||||
/*) app_path=$link ;; #(
|
|
||||||
*) app_path=$APP_HOME$link ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# This is normally unused
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
APP_BASE_NAME=${0##*/}
|
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD=maximum
|
|
||||||
|
|
||||||
warn () {
|
|
||||||
echo "$*"
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
die () {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
nonstop=false
|
|
||||||
case "$( uname )" in #(
|
|
||||||
CYGWIN* ) cygwin=true ;; #(
|
|
||||||
Darwin* ) darwin=true ;; #(
|
|
||||||
MSYS* | MINGW* ) msys=true ;; #(
|
|
||||||
NONSTOP* ) nonstop=true ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
|
||||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
|
||||||
else
|
|
||||||
JAVACMD=$JAVA_HOME/bin/java
|
|
||||||
fi
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
JAVACMD=java
|
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
||||||
case $MAX_FD in #(
|
|
||||||
max*)
|
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC3045
|
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
|
||||||
warn "Could not query maximum file descriptor limit"
|
|
||||||
esac
|
|
||||||
case $MAX_FD in #(
|
|
||||||
'' | soft) :;; #(
|
|
||||||
*)
|
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC3045
|
|
||||||
ulimit -n "$MAX_FD" ||
|
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Collect all arguments for the java command, stacking in reverse order:
|
|
||||||
# * args from the command line
|
|
||||||
# * the main class name
|
|
||||||
# * -classpath
|
|
||||||
# * -D...appname settings
|
|
||||||
# * --module-path (only if needed)
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if "$cygwin" || "$msys" ; then
|
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
||||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
||||||
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
for arg do
|
|
||||||
if
|
|
||||||
case $arg in #(
|
|
||||||
-*) false ;; # don't mess with options #(
|
|
||||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
||||||
[ -e "$t" ] ;; #(
|
|
||||||
*) false ;;
|
|
||||||
esac
|
|
||||||
then
|
|
||||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
||||||
fi
|
|
||||||
# Roll the args list around exactly as many times as the number of
|
|
||||||
# args, so each arg winds up back in the position where it started, but
|
|
||||||
# possibly modified.
|
|
||||||
#
|
|
||||||
# NB: a `for` loop captures its iteration list before it begins, so
|
|
||||||
# changing the positional parameters here affects neither the number of
|
|
||||||
# iterations, nor the values presented in `arg`.
|
|
||||||
shift # remove old arg
|
|
||||||
set -- "$@" "$arg" # push replacement arg
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
|
||||||
# double quotes to make sure that they get re-expanded; and
|
|
||||||
# * put everything else in single quotes, so that it's not re-expanded.
|
|
||||||
|
|
||||||
set -- \
|
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
||||||
-classpath "$CLASSPATH" \
|
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
|
||||||
"$@"
|
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
|
||||||
if ! command -v xargs >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "xargs is not available"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
|
||||||
#
|
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
||||||
#
|
|
||||||
# In Bash we could simply go:
|
|
||||||
#
|
|
||||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
||||||
# set -- "${ARGS[@]}" "$@"
|
|
||||||
#
|
|
||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
||||||
# character that might be a shell metacharacter, then use eval to reverse
|
|
||||||
# that process (while maintaining the separation between arguments), and wrap
|
|
||||||
# the whole thing up as a single "set" statement.
|
|
||||||
#
|
|
||||||
# This will of course break if any of these variables contains a newline or
|
|
||||||
# an unmatched quote.
|
|
||||||
#
|
|
||||||
|
|
||||||
eval "set -- $(
|
|
||||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
||||||
xargs -n1 |
|
|
||||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
||||||
tr '\n' ' '
|
|
||||||
)" '"$@"'
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
|
92
gradlew.bat
vendored
92
gradlew.bat
vendored
|
@ -1,92 +0,0 @@
|
||||||
@rem
|
|
||||||
@rem Copyright 2015 the original author or authors.
|
|
||||||
@rem
|
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
@rem you may not use this file except in compliance with the License.
|
|
||||||
@rem You may obtain a copy of the License at
|
|
||||||
@rem
|
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
@rem
|
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
@rem See the License for the specific language governing permissions and
|
|
||||||
@rem limitations under the License.
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@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=.
|
|
||||||
@rem This is normally unused
|
|
||||||
set APP_BASE_NAME=%~n0
|
|
||||||
set APP_HOME=%DIRNAME%
|
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
||||||
|
|
||||||
@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="-Xmx64m" "-Xms64m"
|
|
||||||
|
|
||||||
@rem Find java.exe
|
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
|
||||||
|
|
||||||
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 execute
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
: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 %*
|
|
||||||
|
|
||||||
:end
|
|
||||||
@rem End local scope for the variables with windows NT shell
|
|
||||||
if %ERRORLEVEL% equ 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!
|
|
||||||
set EXIT_CODE=%ERRORLEVEL%
|
|
||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
|
||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
|
||||||
exit /b %EXIT_CODE%
|
|
||||||
|
|
||||||
:mainEnd
|
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
|
||||||
|
|
||||||
:omega
|
|
BIN
lib/bld/bld-wrapper.jar
Normal file
BIN
lib/bld/bld-wrapper.jar
Normal file
Binary file not shown.
6
lib/bld/bld-wrapper.properties
Normal file
6
lib/bld/bld-wrapper.properties
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
bld.downloadExtensionJavadoc=false
|
||||||
|
bld.downloadExtensionSources=true
|
||||||
|
bld.extension-tests=com.uwyn.rife2:bld-tests-badge:1.0.0
|
||||||
|
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
|
||||||
|
rife2.downloadLocation=
|
||||||
|
rife2.version=1.5.18
|
|
@ -1,202 +0,0 @@
|
||||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
||||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
||||||
import java.net.URI
|
|
||||||
import java.net.http.HttpClient
|
|
||||||
import java.net.http.HttpRequest
|
|
||||||
import java.net.http.HttpResponse
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
`java-library`
|
|
||||||
`maven-publish`
|
|
||||||
pmd
|
|
||||||
signing
|
|
||||||
id("com.github.ben-manes.versions") version "0.46.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
val rifeVersion by rootProject.extra { "1.5.6" }
|
|
||||||
|
|
||||||
group = "com.uwyn.rife2"
|
|
||||||
version = "1.1.0"
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") } // only needed for SNAPSHOT
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation("com.uwyn.rife2:rife2:${rifeVersion}") {
|
|
||||||
this.isChanging = true
|
|
||||||
}
|
|
||||||
runtimeOnly("com.uwyn.rife2:rife2:${rifeVersion}:agent") {
|
|
||||||
this.isChanging = true
|
|
||||||
}
|
|
||||||
|
|
||||||
testImplementation(platform("org.junit:junit-bom:5.9.2"))
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
||||||
testImplementation("org.assertj:assertj-core:3.24.2")
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
all {
|
|
||||||
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
withJavadocJar()
|
|
||||||
withSourcesJar()
|
|
||||||
toolchain {
|
|
||||||
languageVersion.set(JavaLanguageVersion.of(17))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pmd {
|
|
||||||
isIgnoreFailures = true
|
|
||||||
ruleSetFiles = files("${projectDir}/config/pmd.xml")
|
|
||||||
isConsoleOutput = true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tasks {
|
|
||||||
withType<JavaCompile> {
|
|
||||||
options.encoding = "UTF-8"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
test {
|
|
||||||
val apiKey = project.properties["testsBadgeApiKey"]
|
|
||||||
useJUnitPlatform {
|
|
||||||
if (System.getenv("NO_CI") != null) {
|
|
||||||
excludeTags("no-ci")
|
|
||||||
println("Excluded test tags: $excludeTags")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testLogging {
|
|
||||||
exceptionFormat = TestExceptionFormat.FULL
|
|
||||||
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
|
||||||
showStandardStreams = true
|
|
||||||
}
|
|
||||||
|
|
||||||
addTestListener(object : TestListener {
|
|
||||||
override fun beforeTest(p0: TestDescriptor?) = Unit
|
|
||||||
override fun beforeSuite(p0: TestDescriptor?) = Unit
|
|
||||||
override fun afterTest(desc: TestDescriptor, result: TestResult) = Unit
|
|
||||||
override fun afterSuite(desc: TestDescriptor, result: TestResult) {
|
|
||||||
if (desc.parent != null) {
|
|
||||||
val output = result.run {
|
|
||||||
"Results: $resultType (" +
|
|
||||||
"$testCount tests, " +
|
|
||||||
"$successfulTestCount successes, " +
|
|
||||||
"$failedTestCount failures, " +
|
|
||||||
"$skippedTestCount skipped" +
|
|
||||||
")"
|
|
||||||
}
|
|
||||||
val testResultLine = "| $output |"
|
|
||||||
val repeatLength = testResultLine.length
|
|
||||||
val separationLine = "-".repeat(repeatLength)
|
|
||||||
println()
|
|
||||||
println(separationLine)
|
|
||||||
println(testResultLine)
|
|
||||||
println(separationLine)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (desc.parent == null) {
|
|
||||||
val passed = result.successfulTestCount
|
|
||||||
val failed = result.failedTestCount
|
|
||||||
val skipped = result.skippedTestCount
|
|
||||||
|
|
||||||
if (apiKey != null) {
|
|
||||||
val response: HttpResponse<String> = HttpClient.newHttpClient()
|
|
||||||
.send(
|
|
||||||
HttpRequest.newBuilder()
|
|
||||||
.uri(
|
|
||||||
URI(
|
|
||||||
"https://rife2.com/tests-badge/update/com.uwyn.rife2/rife2-renderers?" +
|
|
||||||
"apiKey=$apiKey&" +
|
|
||||||
"passed=$passed&" +
|
|
||||||
"failed=$failed&" +
|
|
||||||
"skipped=$skipped"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.POST(HttpRequest.BodyPublishers.noBody())
|
|
||||||
.build(), HttpResponse.BodyHandlers.ofString()
|
|
||||||
)
|
|
||||||
println("RESPONSE: " + response.statusCode())
|
|
||||||
println(response.body())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
javadoc {
|
|
||||||
title = "<a href=\"https://rife2.com\">RIFE2</a> Template Renderers"
|
|
||||||
options {
|
|
||||||
this as StandardJavadocDocletOptions
|
|
||||||
keyWords(true)
|
|
||||||
splitIndex(true)
|
|
||||||
links("https://rife2.github.io/rife2/")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
create<MavenPublication>("mavenJava") {
|
|
||||||
artifactId = "rife2-renderers"
|
|
||||||
from(components["java"])
|
|
||||||
pom {
|
|
||||||
name.set("RIFE2 Template Renderers")
|
|
||||||
description.set("Template Renderers for the RIFE2 web framework")
|
|
||||||
url.set("https://github.com/rife2/rife2-template-renderers")
|
|
||||||
licenses {
|
|
||||||
license {
|
|
||||||
name.set("The Apache License, Version 2.0")
|
|
||||||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id.set("ethauvin")
|
|
||||||
name.set("Erik C. Thauvin")
|
|
||||||
email.set("erik@thauvin.net")
|
|
||||||
url.set("https://erik.thauvin.net/")
|
|
||||||
}
|
|
||||||
developer {
|
|
||||||
id.set("gbevin")
|
|
||||||
name.set("Geert Bevin")
|
|
||||||
email.set("gbevin@uwyn.com")
|
|
||||||
url.set("https://github.com/gbevin")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scm {
|
|
||||||
connection.set("scm:git:https://github.com/rife2/rife2-template-renderers.git")
|
|
||||||
developerConnection.set("scm:git:git@github.com:rife2/rife2-template-renderers.git")
|
|
||||||
url.set("https://github.com/rife2/rife2-template-renderers")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
credentials {
|
|
||||||
username = System.getenv("SONATYPE_USER")
|
|
||||||
password = System.getenv("SONATYPE_PASSWORD")
|
|
||||||
}
|
|
||||||
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
|
|
||||||
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
|
||||||
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
signing {
|
|
||||||
val signingKey: String? by project // ORG_GRADLE_PROJECT_signingKey
|
|
||||||
val signingPassword: String? by project // ORG_GRADLE_PROJECT_signingPassword
|
|
||||||
useInMemoryPgpKeys(signingKey, signingPassword)
|
|
||||||
sign(publishing.publications["mavenJava"])
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
rootProject.name = "rife2-template-renderers"
|
|
||||||
include("lib")
|
|
75
src/bld/java/rife/render/TemplateRenderersBuild.java
Normal file
75
src/bld/java/rife/render/TemplateRenderersBuild.java
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
package rife.render;
|
||||||
|
|
||||||
|
import rife.bld.Project;
|
||||||
|
import rife.bld.extension.TestsBadgeOperation;
|
||||||
|
import rife.bld.publish.PublishDeveloper;
|
||||||
|
import rife.bld.publish.PublishInfo;
|
||||||
|
import rife.bld.publish.PublishLicense;
|
||||||
|
import rife.bld.publish.PublishScm;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static rife.bld.dependencies.Repository.*;
|
||||||
|
import static rife.bld.dependencies.Scope.*;
|
||||||
|
import static rife.bld.operations.JavadocOptions.DocLinkOption.NO_MISSING;
|
||||||
|
|
||||||
|
public class TemplateRenderersBuild extends Project {
|
||||||
|
private final TestsBadgeOperation testsBadgeOperation = new TestsBadgeOperation();
|
||||||
|
|
||||||
|
public TemplateRenderersBuild() {
|
||||||
|
pkg = "rife.render";
|
||||||
|
name = "rife2-template-renderers";
|
||||||
|
version = version(1, 1, 0);
|
||||||
|
|
||||||
|
javadocOperation().javadocOptions()
|
||||||
|
.docTitle("<a href=\"https://rife2.com\">RIFE2</a> Template Renderers")
|
||||||
|
.docLint(NO_MISSING)
|
||||||
|
.link("https://rife2.github.io/rife2/");
|
||||||
|
|
||||||
|
publishOperation()
|
||||||
|
// .repository(version.isSnapshot() ? repository("rife2-snapshots") : repository("rife2-releases"))
|
||||||
|
.repository(MAVEN_LOCAL)
|
||||||
|
.info(new PublishInfo()
|
||||||
|
.groupId("com.uwyn.rife2")
|
||||||
|
.artifactId("rife2-renderers")
|
||||||
|
.name("RIFE2 Template Renderers")
|
||||||
|
.description("Template Renderers for the RIFE2 web framework")
|
||||||
|
.url("https://github.com/rife2/rife2-template-renderers")
|
||||||
|
.developer(new PublishDeveloper().id("ethauvin").name("Erik C. Thauvin").email("erik@thauvin.net")
|
||||||
|
.url("https://erik.thauvin.net/"))
|
||||||
|
.developer(new PublishDeveloper().id("gbevin").name("Geert Bevin").email("gbevin@uwyn.com")
|
||||||
|
.url("https://github.com/gbevin"))
|
||||||
|
.license(new PublishLicense().name("The Apache License, Version 2.0")
|
||||||
|
.url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
|
||||||
|
.scm(new PublishScm().connection("scm:git:https://github.com/rife2/rife2-template-renderers.git")
|
||||||
|
.developerConnection("scm:git:git@github.com:rife2/rife2-template-renderers.git")
|
||||||
|
.url("https://github.com/rife2/rife2-template-renderers"))
|
||||||
|
.signKey(property("sign.key"))
|
||||||
|
.signPassphrase(property("sign.passphrase")));
|
||||||
|
|
||||||
|
javaRelease = 17;
|
||||||
|
downloadSources = true;
|
||||||
|
autoDownloadPurge = true;
|
||||||
|
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS);
|
||||||
|
|
||||||
|
scope(compile)
|
||||||
|
.include(dependency("com.uwyn.rife2", "rife2", version(1, 5, 18)));
|
||||||
|
scope(runtime)
|
||||||
|
.include(dependency("com.uwyn.rife2", "rife2", version(1, 5, 17), "agent"));
|
||||||
|
scope(test)
|
||||||
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 9, 2)))
|
||||||
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 9, 2)))
|
||||||
|
.include(dependency("org.assertj:assertj-core:3.24.2"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
new TemplateRenderersBuild().start(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void test() throws Exception {
|
||||||
|
testsBadgeOperation.executeOnce(() -> testsBadgeOperation
|
||||||
|
.url(property("testsBadgeUrl"))
|
||||||
|
.apiKey(property("testsBadgeApiKey"))
|
||||||
|
.fromProject(this));
|
||||||
|
}
|
||||||
|
}
|
39
src/test/java/rife/render/DisableOnCiCondition.java
Normal file
39
src/test/java/rife/render/DisableOnCiCondition.java
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2023 the original author or authors.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* 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,
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package rife.render;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.extension.ConditionEvaluationResult;
|
||||||
|
import org.junit.jupiter.api.extension.ExecutionCondition;
|
||||||
|
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables tests on CI condition.
|
||||||
|
*
|
||||||
|
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class DisableOnCiCondition implements ExecutionCondition {
|
||||||
|
@Override
|
||||||
|
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
|
||||||
|
if (System.getenv("CI") != null) {
|
||||||
|
return ConditionEvaluationResult.disabled("Test disabled on CI");
|
||||||
|
} else {
|
||||||
|
return ConditionEvaluationResult.enabled("Test enabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
src/test/java/rife/render/DisabledOnCi.java
Normal file
37
src/test/java/rife/render/DisabledOnCi.java
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2023 the original author or authors.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* 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,
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package rife.render;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables tests on CI annotation.
|
||||||
|
*
|
||||||
|
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Target({ ElementType.TYPE, ElementType.METHOD })
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@ExtendWith(DisableOnCiCondition.class)
|
||||||
|
public @interface DisabledOnCi {
|
||||||
|
}
|
|
@ -71,7 +71,7 @@ class TestFormat {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Tag("no-ci")
|
@DisabledOnCi
|
||||||
void testQrCode() {
|
void testQrCode() {
|
||||||
var t = TemplateFactory.SVG.get("qrCode");
|
var t = TemplateFactory.SVG.get("qrCode");
|
||||||
var foo = "https://example.com/";
|
var foo = "https://example.com/";
|
||||||
|
@ -80,7 +80,7 @@ class TestFormat {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Tag("no-ci")
|
@DisabledOnCi
|
||||||
void testShortenUrl() {
|
void testShortenUrl() {
|
||||||
var t = TemplateFactory.HTML.get("shortenUrl");
|
var t = TemplateFactory.HTML.get("shortenUrl");
|
||||||
var url = "https://example.com/";
|
var url = "https://example.com/";
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue