Compare commits
45 commits
Author | SHA1 | Date | |
---|---|---|---|
d2a623c0bb | |||
5231ca7e11 | |||
eccccec67d | |||
1c9a5191ce | |||
a9cb103cdb | |||
1e5f088639 | |||
0ea3fd0520 | |||
28aebbabfa | |||
771e2fb208 | |||
53defaedb3 | |||
3cac9171fd | |||
6510b2b6b3 | |||
f8cbab5e87 | |||
221fa19b94 | |||
12b4a80296 | |||
f582a1e2c1 | |||
4b741538ad | |||
fdb587c716 | |||
8ebcca5bfe | |||
a748e4139c | |||
34f8fc8fed | |||
0bad2bf332 | |||
81d628a021 | |||
a4ac975051 | |||
36996f36fe | |||
8e64ad8c4a | |||
fed9a5ca3f | |||
86ae130748 | |||
19f21f22dc | |||
c41f1f3b2e | |||
bca19736cf | |||
8de0330b91 | |||
9036a32239 | |||
0f9606391e | |||
8e05823153 | |||
6bef05c7de | |||
b2b0540e39 | |||
154bcccc9c | |||
ab87916f16 | |||
f01ed318f9 | |||
fecf40457a | |||
dd2dff89b4 | |||
0f01084405 | |||
4274930988 | |||
c9d4ec46df |
53 changed files with 414 additions and 243 deletions
|
@ -1,4 +1,8 @@
|
||||||
version: 2
|
version: 2.1
|
||||||
|
|
||||||
|
orbs:
|
||||||
|
sdkman: joshdholtz/sdkman@0.2.0
|
||||||
|
|
||||||
defaults: &defaults
|
defaults: &defaults
|
||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
environment:
|
environment:
|
||||||
|
@ -6,18 +10,31 @@ defaults: &defaults
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
CI_NAME: "CircleCI"
|
CI_NAME: "CircleCI"
|
||||||
|
|
||||||
defaults_gradle: &defaults_bld
|
commands:
|
||||||
steps:
|
build_and_test:
|
||||||
- checkout
|
parameters:
|
||||||
- run:
|
reports-dir:
|
||||||
name: Download the bld dependencies
|
type: string
|
||||||
command: ./bld download
|
default: "build/reports/test_results"
|
||||||
- run:
|
steps:
|
||||||
name: Compile source with bld
|
- checkout
|
||||||
command: ./bld compile
|
- sdkman/setup-sdkman
|
||||||
- run:
|
- sdkman/sdkman-install:
|
||||||
name: Run tests with bld
|
candidate: kotlin
|
||||||
command: ./bld test
|
version: 2.1.10
|
||||||
|
- run:
|
||||||
|
name: Download dependencies
|
||||||
|
command: ./bld download
|
||||||
|
- run:
|
||||||
|
name: Compile source
|
||||||
|
command: ./bld compile
|
||||||
|
- run:
|
||||||
|
name: Run tests
|
||||||
|
command: ./bld jacoco -reports-dir=<< parameters.reports-dir >>
|
||||||
|
- store_test_results:
|
||||||
|
path: << parameters.reports-dir >>
|
||||||
|
- store_artifacts:
|
||||||
|
path: build/reports/jacoco/test/html
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bld_jdk17:
|
bld_jdk17:
|
||||||
|
@ -26,19 +43,20 @@ jobs:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:17.0
|
- image: cimg/openjdk:17.0
|
||||||
|
|
||||||
<<: *defaults_bld
|
steps:
|
||||||
|
- build_and_test
|
||||||
|
|
||||||
bld_jdk20:
|
bld_jdk21:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:20.0
|
- image: cimg/openjdk:21.0
|
||||||
|
|
||||||
<<: *defaults_bld
|
steps:
|
||||||
|
- build_and_test
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
|
||||||
bld:
|
bld:
|
||||||
jobs:
|
jobs:
|
||||||
- bld_jdk17
|
- bld_jdk17
|
||||||
- bld_jdk20
|
- bld_jdk21
|
||||||
|
|
62
.github/workflows/bld.yml
vendored
62
.github/workflows/bld.yml
vendored
|
@ -2,50 +2,72 @@ name: bld-ci
|
||||||
|
|
||||||
on: [ push, pull_request, workflow_dispatch ]
|
on: [ push, pull_request, workflow_dispatch ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
COVERAGE_JDK: "21"
|
||||||
|
COVERAGE_KOTLIN: "2.1.20"
|
||||||
|
PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-bld-project:
|
build-bld-project:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
env:
|
|
||||||
COVERAGE_SDK: "17"
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [ 17, 20 ]
|
java-version: [ 17, 21, 24 ]
|
||||||
|
kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ]
|
||||||
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK ${{ matrix.java-version }} with Kotlin ${{ matrix.kotlin-version }}
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: "zulu"
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
- name: Grant bld execute permission
|
- name: Download dependencies [bld example]
|
||||||
run: chmod +x bld
|
working-directory: examples/bld
|
||||||
|
|
||||||
- name: Download the bld dependencies
|
|
||||||
run: ./bld download
|
run: ./bld download
|
||||||
|
|
||||||
- name: Compile source with bld
|
- name: Compile and run examples [bld example]
|
||||||
|
working-directory: examples/bld
|
||||||
|
run: |
|
||||||
|
./bld compile
|
||||||
|
./bld run
|
||||||
|
./bld run-java
|
||||||
|
|
||||||
|
- name: Run example [gradle java example]
|
||||||
|
working-directory: examples/gradle/java
|
||||||
|
run: |
|
||||||
|
./gradlew run
|
||||||
|
|
||||||
|
- name: Run example [gradle kotlin example]
|
||||||
|
working-directory: examples/gradle/kotlin
|
||||||
|
run: |
|
||||||
|
./gradlew run
|
||||||
|
|
||||||
|
- name: Download dependencies
|
||||||
|
run: ./bld download
|
||||||
|
|
||||||
|
- name: Compile source
|
||||||
run: ./bld compile
|
run: ./bld compile
|
||||||
|
|
||||||
- name: Run tests with bld
|
- name: Run tests
|
||||||
env:
|
|
||||||
PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }}
|
|
||||||
run: ./bld jacoco
|
run: ./bld jacoco
|
||||||
|
|
||||||
- name: Remove pom.xml
|
- name: Remove pom.xml
|
||||||
if: success() && matrix.java-version == env.COVERAGE_SDK
|
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
||||||
|
&& matrix.os == 'ubuntu-latest'
|
||||||
run: rm -rf pom.xml
|
run: rm -rf pom.xml
|
||||||
|
|
||||||
- name: SonarCloud Scan
|
- name: SonarCloud Scan
|
||||||
uses: sonarsource/sonarcloud-github-action@master
|
uses: sonarsource/sonarcloud-github-action@master
|
||||||
if: success() && matrix.java-version == env.COVERAGE_SDK
|
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
||||||
|
&& matrix.os == 'ubuntu-latest'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
|
@ -1,11 +1,24 @@
|
||||||
image: openjdk:17
|
image: fedora:latest
|
||||||
|
|
||||||
|
variables:
|
||||||
|
CI_NAME: "GitLab CI"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- dnf -qy update && dnf -y install zip
|
||||||
|
- curl -s "https://get.sdkman.io" | bash
|
||||||
|
- echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
|
||||||
|
- echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
|
||||||
|
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
- sdk install java
|
||||||
|
- sdk install kotlin
|
||||||
|
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- ./bld download
|
- ./bld download
|
||||||
- ./bld compile
|
- ./bld compile
|
||||||
- ./bld test
|
- ./bld test
|
||||||
|
|
6
.idea/bld.xml
generated
Normal file
6
.idea/bld.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BldConfiguration">
|
||||||
|
<events />
|
||||||
|
</component>
|
||||||
|
</project>
|
2
.idea/copyright/Erik_s_Copyright_Notice.xml
generated
2
.idea/copyright/Erik_s_Copyright_Notice.xml
generated
|
@ -1,6 +1,6 @@
|
||||||
<component name="CopyrightManager">
|
<component name="CopyrightManager">
|
||||||
<copyright>
|
<copyright>
|
||||||
<option name="notice" value="&#36;file.fileName Copyright 2021-&#36;today.year Erik C. Thauvin (erik@thauvin.net) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of this project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
|
<option name="notice" value="&#36;file.fileName Copyright (c) 2017-&#36;today.year, Erik C. Thauvin (erik@thauvin.net) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of this project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
|
||||||
<option name="myName" value="Erik's Copyright Notice" />
|
<option name="myName" value="Erik's Copyright Notice" />
|
||||||
</copyright>
|
</copyright>
|
||||||
</component>
|
</component>
|
6
.idea/icon.svg
generated
Normal file
6
.idea/icon.svg
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="290px" height="290px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<g><path style="opacity:1" fill="#172ff1" d="M -0.5,-0.5 C 96.1667,-0.5 192.833,-0.5 289.5,-0.5C 289.5,96.1667 289.5,192.833 289.5,289.5C 192.833,289.5 96.1667,289.5 -0.5,289.5C -0.5,192.833 -0.5,96.1667 -0.5,-0.5 Z"/></g>
|
||||||
|
<g><path style="opacity:1" fill="#fcfdfe" d="M 105.5,36.5 C 107.309,44.7755 108.142,53.4421 108,62.5C 130.167,82 152.333,101.5 174.5,121C 182.659,120.794 190.825,120.294 199,119.5C 201.833,119.833 204.667,120.167 207.5,120.5C 196.031,132.008 184.698,143.508 173.5,155C 197.398,185.275 221.898,215.109 247,244.5C 248.919,246.691 250.253,249.024 251,251.5C 219.592,225.547 188.092,199.714 156.5,174C 155.5,173.333 154.5,173.333 153.5,174C 142.586,185.15 131.586,196.316 120.5,207.5C 120.167,204.667 119.833,201.833 119.5,199C 120.294,190.825 120.794,182.659 121,174.5C 101.618,152.623 82.4511,130.623 63.5,108.5C 54.5,107.833 45.5,107.167 36.5,106.5C 59.5211,83.1458 82.5211,59.8125 105.5,36.5 Z"/></g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
|
@ -4,5 +4,6 @@
|
||||||
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<option name="ADDITIONAL_TAGS" value="created" />
|
<option name="ADDITIONAL_TAGS" value="created" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
|
<inspection_tool class="UsePropertyAccessSyntax" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
4
.idea/libraries/bld.xml
generated
4
.idea/libraries/bld.xml
generated
|
@ -2,12 +2,12 @@
|
||||||
<library name="bld">
|
<library name="bld">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
|
4
.idea/libraries/compile.xml
generated
4
.idea/libraries/compile.xml
generated
|
@ -7,7 +7,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
.idea/libraries/runtime.xml
generated
4
.idea/libraries/runtime.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
.idea/libraries/test.xml
generated
4
.idea/libraries/test.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
|
@ -16,6 +16,7 @@
|
||||||
<option value="$PROJECT_DIR$/../../java/bld-checkstyle/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/../../java/bld-checkstyle/config/pmd.xml" />
|
||||||
<option value="$PROJECT_DIR$/../../java/bld-exec/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/../../java/bld-exec/config/pmd.xml" />
|
||||||
<option value="$PROJECT_DIR$/../../java/bld-testng/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/../../java/bld-testng/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../../java/bld-generated-version/config/pmd.xml" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
<option name="skipTestSources" value="false" />
|
<option name="skipTestSources" value="false" />
|
||||||
|
|
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
|
@ -3,13 +3,13 @@
|
||||||
"src/main/java",
|
"src/main/java",
|
||||||
"src/main/resources",
|
"src/main/resources",
|
||||||
"src/test/java",
|
"src/test/java",
|
||||||
"src/bld/java"
|
"src/test/resources",
|
||||||
|
"src/bld/java",
|
||||||
|
"src/bld/resources"
|
||||||
],
|
],
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"${HOME}/.bld/dist/bld-1.7.5.jar",
|
"${HOME}/.bld/dist/bld-2.2.1.jar",
|
||||||
"lib/compile/*.jar",
|
"lib/**/*.jar"
|
||||||
"lib/runtime/*.jar",
|
|
||||||
"lib/test/*.jar"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2017-2023, Erik C. Thauvin (erik@thauvin.net)
|
Copyright (c) 2017-2025, Erik C. Thauvin (erik@thauvin.net)
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|
40
README.md
40
README.md
|
@ -1,7 +1,8 @@
|
||||||
# [Pinboard](https://pinboard.in) Poster for Kotlin, Java and Android
|
# [Pinboard](https://pinboard.in) Poster for Kotlin, Java and Android
|
||||||
|
|
||||||
[](https://opensource.org/licenses/BSD-3-Clause)
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
||||||
[](https://kotlinlang.org/)
|
[](https://kotlinlang.org/)
|
||||||
|
[](https://rife2.com/bld)
|
||||||
[](https://github.com/ethauvin/pinboard-poster/releases/latest)
|
[](https://github.com/ethauvin/pinboard-poster/releases/latest)
|
||||||
[](https://central.sonatype.com/artifact/net.thauvin.erik/pinboard-poster)
|
[](https://central.sonatype.com/artifact/net.thauvin.erik/pinboard-poster)
|
||||||
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/pinboard-poster/)
|
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/pinboard-poster/)
|
||||||
|
@ -21,9 +22,9 @@ A small library for posting to [Pinboard](https://pinboard.in).
|
||||||
|
|
||||||
val poster = PinboardPoster("user:TOKEN")
|
val poster = PinboardPoster("user:TOKEN")
|
||||||
|
|
||||||
poster.addPin("https://www.example.com/foo", "This is a test")
|
poster.addPin("https://example.com/foo", "This is a test")
|
||||||
poster.addPin("https://examples.com", "This is a test", tags = arrayOf("foo", "bar"))
|
poster.addPin("https://example.com", "This is a test", tags = arrayOf("foo", "bar"))
|
||||||
poster.deletePin("https:///www.example.com/bar")
|
poster.deletePin("https://example.com/bar")
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -35,20 +36,17 @@ poster.deletePin("https:///www.example.com/bar")
|
||||||
|
|
||||||
final PinboardPoster poster = new PinBboardPoster("user:TOKEN");
|
final PinboardPoster poster = new PinBboardPoster("user:TOKEN");
|
||||||
|
|
||||||
poster.addPin("https://www.example.com/foo", "This is a test");
|
poster.addPin("https://example.com/foo", "This is a test");
|
||||||
poster.addPin(new PinConfig.Builder()
|
poster.addPin(new PinConfig.Builder("https://example.com", "This is a test")
|
||||||
.url("https://example.com")
|
|
||||||
.description("This is a test")
|
|
||||||
.tags("foo", "bar")
|
.tags("foo", "bar")
|
||||||
.build());
|
.build());
|
||||||
poster.deletePin("https:///www.example.com/bar");
|
poster.deletePin("https://example.com/bar");
|
||||||
```
|
```
|
||||||
|
|
||||||
[View Examples](https://github.com/ethauvin/pinboard-poster/blob/master/examples)
|
[View Examples](https://github.com/ethauvin/pinboard-poster/blob/master/examples)
|
||||||
|
|
||||||
Your API authentication token is available on the [Pinboard settings page](https://pinboard.in/settings/password).
|
Your API authentication token is available on the [Pinboard settings page](https://pinboard.in/settings/password).
|
||||||
|
|
||||||
|
|
||||||
## bld
|
## bld
|
||||||
|
|
||||||
To use with [bld](https://rife2.com/bld), include the following dependency in your [build](https://github.com/ethauvin/pinboard-poster/blob/master/examples/bld/src/bld/java/net/thauvin/erik/pinboard/samples/ExampleBuild.java) file:
|
To use with [bld](https://rife2.com/bld), include the following dependency in your [build](https://github.com/ethauvin/pinboard-poster/blob/master/examples/bld/src/bld/java/net/thauvin/erik/pinboard/samples/ExampleBuild.java) file:
|
||||||
|
@ -57,7 +55,7 @@ To use with [bld](https://rife2.com/bld), include the following dependency in yo
|
||||||
repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
|
repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
|
||||||
|
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("net.thauvin.erik:pinboard-poster:1.1.0"));
|
.include(dependency("net.thauvin.erik:pinboard-poster:1.2.0"));
|
||||||
```
|
```
|
||||||
Be sure to use the [bld Kotlin extension](https://github.com/rife2/bld-kotlin) in your project.
|
Be sure to use the [bld Kotlin extension](https://github.com/rife2/bld-kotlin) in your project.
|
||||||
|
|
||||||
|
@ -73,7 +71,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'net.thauvin.erik:pinboard-poster:1.1.0'
|
compile 'net.thauvin.erik:pinboard-poster:1.2.0'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -199,3 +197,21 @@ The API end point is automatically configured to `https://api.pinboard.in/v1/`.
|
||||||
```kotlin
|
```kotlin
|
||||||
poster.apiEndPoint = "https://www.example.com/v1"
|
poster.apiEndPoint = "https://www.example.com/v1"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
If you want to contribute to this project, all you have to do is clone the GitHub
|
||||||
|
repository:
|
||||||
|
|
||||||
|
```console
|
||||||
|
git clone git@github.com:ethauvin/pinboard-poster.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Then use [bld](https://rife2.com/bld) to build:
|
||||||
|
|
||||||
|
```console
|
||||||
|
cd pinboard-poster
|
||||||
|
./bld compile
|
||||||
|
```
|
||||||
|
|
||||||
|
The project has an [IntelliJ IDEA](https://www.jetbrains.com/idea/) project structure. You can just open it after all the dependencies were downloaded and peruse the code.
|
||||||
|
|
|
@ -1,10 +1,20 @@
|
||||||
image: openjdk:17
|
image: ubuntu:latest
|
||||||
|
|
||||||
pipelines:
|
pipelines:
|
||||||
default:
|
default:
|
||||||
- step:
|
- step:
|
||||||
name: Test with bld
|
name: Test with bld
|
||||||
script:
|
script:
|
||||||
|
# Install latest Java & Kotlin via SDKMAN!
|
||||||
|
- apt-get update -qq && apt-get install -y curl zip
|
||||||
|
- curl -s "https://get.sdkman.io" | bash
|
||||||
|
- echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
|
||||||
|
- echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
|
||||||
|
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
- sdk install java
|
||||||
|
- sdk install kotlin
|
||||||
|
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
# Download, compile and test with bld
|
||||||
- ./bld download
|
- ./bld download
|
||||||
- ./bld compile
|
- ./bld compile
|
||||||
- ./bld test
|
- ./bld test
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version="1.0" ?>
|
||||||
<SmellBaseline>
|
<SmellBaseline>
|
||||||
<ManuallySuppressedIssues/>
|
<ManuallySuppressedIssues></ManuallySuppressedIssues>
|
||||||
<CurrentIssues>
|
<CurrentIssues>
|
||||||
<ID>LongParameterList:PinConfig.kt$PinConfig$( val url: String, val description: String, val extended: String, val tags: Array<out String>, val dt: ZonedDateTime, val replace: Boolean, val shared: Boolean, val toRead: Boolean )</ID>
|
<ID>LongParameterList:PinConfig.kt$PinConfig$( var url: String, var description: String, var extended: String = "", var tags: Array<out String> = emptyArray(), var dt: ZonedDateTime = ZonedDateTime.now(), var replace: Boolean = true, var shared: Boolean = true, var toRead: Boolean = false )</ID>
|
||||||
<ID>LongParameterList:PinboardPoster.kt$PinboardPoster$( url: String, description: String, extended: String = "", vararg tags: String = emptyArray(), dt: ZonedDateTime = ZonedDateTime.now(), replace: Boolean = true, shared: Boolean = true, toRead: Boolean = false )</ID>
|
<ID>LongParameterList:PinboardPoster.kt$PinboardPoster$( url: String, description: String, extended: String = "", vararg tags: String = emptyArray(), dt: ZonedDateTime = ZonedDateTime.now(), replace: Boolean = true, shared: Boolean = true, toRead: Boolean = false )</ID>
|
||||||
<ID>NestedBlockDepth:PinboardPoster.kt$PinboardPoster$private fun executeMethod(method: String, params: Map<String, String>): Boolean</ID>
|
<ID>NestedBlockDepth:PinboardPoster.kt$PinboardPoster$private fun executeMethod(method: String, params: Map<String, String>): Boolean</ID>
|
||||||
<ID>ThrowsCount:PinboardPoster.kt$PinboardPoster$@Throws(IOException::class) internal fun parseMethodResponse(method: String, response: String)</ID>
|
<ID>ThrowsCount:PinboardPoster.kt$PinboardPoster$@Throws(IOException::class) internal fun parseMethodResponse(method: String, response: String)</ID>
|
||||||
<ID>TooManyFunctions:PinConfig.kt$PinConfig$Builder</ID>
|
<ID>TooManyFunctions:PinConfig.kt$PinConfig$Builder</ID>
|
||||||
</CurrentIssues>
|
</CurrentIssues>
|
||||||
|
|
6
examples/bld/.idea/bld.xml
generated
Normal file
6
examples/bld/.idea/bld.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BldConfiguration">
|
||||||
|
<events />
|
||||||
|
</component>
|
||||||
|
</project>
|
4
examples/bld/.idea/libraries/bld.xml
generated
4
examples/bld/.idea/libraries/bld.xml
generated
|
@ -2,12 +2,12 @@
|
||||||
<library name="bld">
|
<library name="bld">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
|
4
examples/bld/.idea/libraries/compile.xml
generated
4
examples/bld/.idea/libraries/compile.xml
generated
|
@ -7,7 +7,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
examples/bld/.idea/libraries/runtime.xml
generated
4
examples/bld/.idea/libraries/runtime.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
examples/bld/.idea/libraries/test.xml
generated
4
examples/bld/.idea/libraries/test.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
10
examples/bld/.vscode/settings.json
vendored
10
examples/bld/.vscode/settings.json
vendored
|
@ -3,13 +3,13 @@
|
||||||
"src/main/java",
|
"src/main/java",
|
||||||
"src/main/resources",
|
"src/main/resources",
|
||||||
"src/test/java",
|
"src/test/java",
|
||||||
"src/bld/java"
|
"src/test/resources",
|
||||||
|
"src/bld/java",
|
||||||
|
"src/bld/resources"
|
||||||
],
|
],
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"${HOME}/.bld/dist/bld-1.7.5.jar",
|
"${HOME}/.bld/dist/bld-2.2.1.jar",
|
||||||
"lib/compile/*.jar",
|
"lib/**/*.jar"
|
||||||
"lib/runtime/*.jar",
|
|
||||||
"lib/test/*.jar"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT
|
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
|
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT
|
||||||
|
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=1.7.5
|
bld.version=2.2.1
|
||||||
|
|
|
@ -3,6 +3,7 @@ package net.thauvin.erik.pinboard.samples;
|
||||||
import rife.bld.BaseProject;
|
import rife.bld.BaseProject;
|
||||||
import rife.bld.BuildCommand;
|
import rife.bld.BuildCommand;
|
||||||
import rife.bld.extension.CompileKotlinOperation;
|
import rife.bld.extension.CompileKotlinOperation;
|
||||||
|
import rife.bld.extension.kotlin.CompileOptions;
|
||||||
import rife.bld.operations.RunOperation;
|
import rife.bld.operations.RunOperation;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -25,7 +26,7 @@ public class ExampleBuild extends BaseProject {
|
||||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
|
||||||
|
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("net.thauvin.erik", "pinboard-poster", version(1, 1, 1)));
|
.include(dependency("net.thauvin.erik", "pinboard-poster", version(1, 2, 1, "SNAPSHOT")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -36,6 +37,7 @@ public class ExampleBuild extends BaseProject {
|
||||||
public void compile() throws Exception {
|
public void compile() throws Exception {
|
||||||
new CompileKotlinOperation()
|
new CompileKotlinOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
|
.compileOptions(new CompileOptions().verbose(true))
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
// Also compile the Java source code
|
// Also compile the Java source code
|
||||||
|
|
|
@ -31,9 +31,7 @@ public class JavaExample {
|
||||||
|
|
||||||
if (poster.validate()) {
|
if (poster.validate()) {
|
||||||
// Add Pin
|
// Add Pin
|
||||||
if (poster.addPin(new PinConfig.Builder()
|
if (poster.addPin(new PinConfig.Builder(url, "Testing")
|
||||||
.url(url)
|
|
||||||
.description("Testing")
|
|
||||||
.extended("Extra")
|
.extended("Extra")
|
||||||
.tags("test", "java")
|
.tags("test", "java")
|
||||||
.build())) {
|
.build())) {
|
||||||
|
|
6
examples/gradle/java/.idea/misc.xml
generated
6
examples/gradle/java/.idea/misc.xml
generated
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="PDMPlugin">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<option name="skipTestSources" value="false" />
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="20" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.github.ben-manes.versions' version '0.50.0'
|
id 'com.github.ben-manes.versions' version '0.51.0'
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'application'
|
id 'application'
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultTasks 'run'
|
defaultTasks 'run'
|
||||||
|
|
||||||
mainClassName = 'net.thauvin.erik.pinboard.samples.JavaExample'
|
application {
|
||||||
|
mainClass = 'net.thauvin.erik.pinboard.samples.JavaExample'
|
||||||
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
@ -16,8 +18,9 @@ java {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'net.thauvin.erik:pinboard-poster:1.1.1'
|
implementation 'net.thauvin.erik:pinboard-poster:1.2.1-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
12
examples/gradle/java/gradlew
vendored
12
examples/gradle/java/gradlew
vendored
|
@ -15,6 +15,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
@ -55,7 +57,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (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
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@ -84,7 +86,7 @@ done
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
@ -112,7 +114,7 @@ case "$( uname )" in #(
|
||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
|
@ -203,7 +205,7 @@ fi
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|
26
examples/gradle/java/gradlew.bat
vendored
26
examples/gradle/java/gradlew.bat
vendored
|
@ -13,6 +13,8 @@
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
* in the user guide at https://docs.gradle.org/4.8/userguide/multi_project_builds.html
|
* in the user guide at https://docs.gradle.org/4.8/userguide/multi_project_builds.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rootProject.name = 'samples-java'
|
rootProject.name = 'pinboard-poster-examples-gradle-java'
|
||||||
|
|
|
@ -31,9 +31,7 @@ public class JavaExample {
|
||||||
|
|
||||||
if (poster.validate()) {
|
if (poster.validate()) {
|
||||||
// Add Pin
|
// Add Pin
|
||||||
if (poster.addPin(new PinConfig.Builder()
|
if (poster.addPin(new PinConfig.Builder(url, "Testing")
|
||||||
.url(url)
|
|
||||||
.description("Testing")
|
|
||||||
.extended("Extra")
|
.extended("Extra")
|
||||||
.tags("test", "java")
|
.tags("test", "java")
|
||||||
.build())) {
|
.build())) {
|
||||||
|
|
2
examples/gradle/kotlin/.idea/.name
generated
2
examples/gradle/kotlin/.idea/.name
generated
|
@ -1 +1 @@
|
||||||
pinboard-poster-examples-gradle-kotlin
|
pinboard-post-examples-gradle-kotlin
|
9
examples/gradle/kotlin/.idea/kotlin.iml
generated
Normal file
9
examples/gradle/kotlin/.idea/kotlin.iml
generated
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
2
examples/gradle/kotlin/.idea/kotlinc.xml
generated
2
examples/gradle/kotlin/.idea/kotlinc.xml
generated
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="1.9.21" />
|
<option name="version" value="2.0.0" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
4
examples/gradle/kotlin/.idea/misc.xml
generated
4
examples/gradle/kotlin/.idea/misc.xml
generated
|
@ -4,5 +4,5 @@
|
||||||
<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_11" project-jdk-name="20" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
8
examples/gradle/kotlin/.idea/modules.xml
generated
Normal file
8
examples/gradle/kotlin/.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/kotlin.iml" filepath="$PROJECT_DIR$/.idea/kotlin.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -2,8 +2,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("application")
|
id("application")
|
||||||
id("com.github.ben-manes.versions") version "0.50.0"
|
id("com.github.ben-manes.versions") version "0.51.0"
|
||||||
kotlin("jvm") version "1.9.21"
|
kotlin("jvm") version "2.1.20"
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
|
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
|
||||||
|
@ -11,10 +11,11 @@ defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("net.thauvin.erik:pinboard-poster:1.1.1")
|
implementation("net.thauvin.erik:pinboard-poster:1.2.1-SNAPSHOT")
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -26,8 +27,6 @@ application {
|
||||||
mainClass.set("net.thauvin.erik.pinboard.samples.KotlinExampleKt")
|
mainClass.set("net.thauvin.erik.pinboard.samples.KotlinExampleKt")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
kotlin {
|
||||||
withType<KotlinCompile>().configureEach {
|
compilerOptions.jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11)
|
||||||
kotlinOptions.jvmTarget = java.targetCompatibility.toString()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
12
examples/gradle/kotlin/gradlew
vendored
12
examples/gradle/kotlin/gradlew
vendored
|
@ -15,6 +15,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
@ -55,7 +57,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (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
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@ -84,7 +86,7 @@ done
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
@ -112,7 +114,7 @@ case "$( uname )" in #(
|
||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
|
@ -203,7 +205,7 @@ fi
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|
26
examples/gradle/kotlin/gradlew.bat
vendored
26
examples/gradle/kotlin/gradlew.bat
vendored
|
@ -13,6 +13,8 @@
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
rootProject.name = "samples-kotlin"
|
rootProject.name = "pinboard-post-examples-gradle-kotlin"
|
||||||
|
|
Binary file not shown.
|
@ -1,9 +1,10 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extension.jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
|
||||||
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT
|
|
||||||
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.0-SNAPSHOT
|
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
|
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.10-SNAPSHOT
|
||||||
|
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.4-SNAPSHOT
|
||||||
|
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.10
|
||||||
|
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT
|
||||||
|
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=1.7.5
|
bld.version=2.2.1
|
||||||
|
|
14
pom.xml
14
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>net.thauvin.erik</groupId>
|
<groupId>net.thauvin.erik</groupId>
|
||||||
<artifactId>pinboard-poster</artifactId>
|
<artifactId>pinboard-poster</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.2.1-SNAPSHOT</version>
|
||||||
<name>pinboard-poster</name>
|
<name>pinboard-poster</name>
|
||||||
<description>A small library for posting to Pinboard</description>
|
<description>A small library for posting to Pinboard</description>
|
||||||
<url>https://github.com/ethauvin/pinboard-poster</url>
|
<url>https://github.com/ethauvin/pinboard-poster</url>
|
||||||
|
@ -18,25 +18,19 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-stdlib</artifactId>
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
<version>1.9.21</version>
|
<version>2.1.20</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-stdlib-common</artifactId>
|
<artifactId>kotlin-stdlib-common</artifactId>
|
||||||
<version>1.9.21</version>
|
<version>2.1.20</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
|
||||||
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
|
||||||
<version>1.9.21</version>
|
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||||
<version>1.9.21</version>
|
<version>2.1.20</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PinboardPosterBuild.java
|
* PinboardPosterBuild.java
|
||||||
*
|
*
|
||||||
* Copyright 2021-2023 Erik C. Thauvin (erik@thauvin.net)
|
* Copyright (c) 2017-2025, Erik C. Thauvin (erik@thauvin.net)
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -35,10 +35,11 @@ import rife.bld.BuildCommand;
|
||||||
import rife.bld.Project;
|
import rife.bld.Project;
|
||||||
import rife.bld.extension.CompileKotlinOperation;
|
import rife.bld.extension.CompileKotlinOperation;
|
||||||
import rife.bld.extension.DetektOperation;
|
import rife.bld.extension.DetektOperation;
|
||||||
|
import rife.bld.extension.DokkaOperation;
|
||||||
import rife.bld.extension.JacocoReportOperation;
|
import rife.bld.extension.JacocoReportOperation;
|
||||||
import rife.bld.extension.dokka.DokkaOperation;
|
|
||||||
import rife.bld.extension.dokka.LoggingLevel;
|
import rife.bld.extension.dokka.LoggingLevel;
|
||||||
import rife.bld.extension.dokka.OutputFormat;
|
import rife.bld.extension.dokka.OutputFormat;
|
||||||
|
import rife.bld.extension.kotlin.CompileOptions;
|
||||||
import rife.bld.operations.exceptions.ExitStatusException;
|
import rife.bld.operations.exceptions.ExitStatusException;
|
||||||
import rife.bld.publish.PomBuilder;
|
import rife.bld.publish.PomBuilder;
|
||||||
import rife.bld.publish.PublishDeveloper;
|
import rife.bld.publish.PublishDeveloper;
|
||||||
|
@ -49,16 +50,21 @@ import rife.tools.exceptions.FileUtilsErrorException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.ConsoleHandler;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import static rife.bld.dependencies.Repository.*;
|
import static rife.bld.dependencies.Repository.*;
|
||||||
import static rife.bld.dependencies.Scope.compile;
|
import static rife.bld.dependencies.Scope.compile;
|
||||||
import static rife.bld.dependencies.Scope.test;
|
import static rife.bld.dependencies.Scope.test;
|
||||||
|
|
||||||
public class PinboardPosterBuild extends Project {
|
public class PinboardPosterBuild extends Project {
|
||||||
|
final File srcMainKotlin = new File(srcMainDirectory(), "kotlin");
|
||||||
|
|
||||||
public PinboardPosterBuild() {
|
public PinboardPosterBuild() {
|
||||||
pkg = "net.thauvin.erik";
|
pkg = "net.thauvin.erik";
|
||||||
name = "pinboard-poster";
|
name = "pinboard-poster";
|
||||||
version = version(1, 1, 1);
|
version = version(1, 2, 1, "SNAPSHOT");
|
||||||
|
|
||||||
mainClass = pkg + ".PinboardPoster";
|
mainClass = pkg + ".PinboardPoster";
|
||||||
|
|
||||||
|
@ -68,62 +74,73 @@ public class PinboardPosterBuild extends Project {
|
||||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
||||||
|
|
||||||
final var okHttp = version(4, 12, 0);
|
final var okHttp = version(4, 12, 0);
|
||||||
final var kotlin = version(1, 9, 21);
|
final var kotlin = version(2, 1, 20);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
|
// Kotlin
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-common", kotlin))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-common", kotlin))
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk7", kotlin))
|
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin))
|
||||||
|
// OkHttp
|
||||||
.include(dependency("com.squareup.okhttp3", "okhttp", okHttp))
|
.include(dependency("com.squareup.okhttp3", "okhttp", okHttp))
|
||||||
.include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp));
|
.include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", version(1, 9, 21)))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 2)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)));
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 2)))
|
||||||
|
.include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 2)));
|
||||||
|
|
||||||
publishOperation()
|
publishOperation()
|
||||||
.repository(version.isSnapshot() ? repository(SONATYPE_SNAPSHOTS_LEGACY.location())
|
.repository(version.isSnapshot() ? repository(SONATYPE_SNAPSHOTS_LEGACY.location())
|
||||||
.withCredentials(property("sonatype.user"), property("sonatype.password"))
|
.withCredentials(property("sonatype.user"), property("sonatype.password"))
|
||||||
: repository(SONATYPE_RELEASES_LEGACY.location())
|
: repository(SONATYPE_RELEASES_LEGACY.location())
|
||||||
.withCredentials(property("sonatype.user"), property("sonatype.password")))
|
.withCredentials(property("sonatype.user"), property("sonatype.password")))
|
||||||
|
.repository(repository("github"))
|
||||||
.info()
|
.info()
|
||||||
.groupId(pkg)
|
.groupId(pkg)
|
||||||
.artifactId(name)
|
.artifactId(name)
|
||||||
.description("A small library for posting to Pinboard")
|
.description("A small library for posting to Pinboard")
|
||||||
.url("https://github.com/ethauvin/" + name)
|
.url("https://github.com/ethauvin/" + name)
|
||||||
.developer(
|
.developer(new PublishDeveloper()
|
||||||
new PublishDeveloper()
|
.id("ethauvin")
|
||||||
.id("ethauvin")
|
.name("Erik C. Thauvin")
|
||||||
.name("Erik C. Thauvin")
|
.email("erik@thauvin.net")
|
||||||
.email("erik@thauvin.net")
|
.url("https://erik.thauvin.net/")
|
||||||
.url("https://erik.thauvin.net/")
|
|
||||||
)
|
)
|
||||||
.license(
|
.license(new PublishLicense()
|
||||||
new PublishLicense()
|
.name("BSD 3-Clause")
|
||||||
.name("BSD 3-Clause")
|
.url("https://opensource.org/licenses/BSD-3-Clause")
|
||||||
.url("https://opensource.org/licenses/BSD-3-Clause")
|
|
||||||
)
|
)
|
||||||
.scm(
|
.scm(new PublishScm()
|
||||||
new PublishScm()
|
.connection("scm:git:https://github.com/ethauvin/" + name + ".git")
|
||||||
.connection("scm:git:https://github.com/ethauvin/" + name + ".git")
|
.developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git")
|
||||||
.developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git")
|
.url("https://github.com/ethauvin/" + name)
|
||||||
.url("https://github.com/ethauvin/" + name)
|
|
||||||
)
|
)
|
||||||
.signKey(property("sign.key"))
|
.signKey(property("sign.key"))
|
||||||
.signPassphrase(property("sign.passphrase"));
|
.signPassphrase(property("sign.passphrase"));
|
||||||
|
|
||||||
jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin"));
|
jarSourcesOperation().sourceDirectories(srcMainKotlin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(final String[] args) {
|
public static void main(final String[] args) {
|
||||||
|
// Enable detailed logging for the extensions
|
||||||
|
var level = Level.ALL;
|
||||||
|
var logger = Logger.getLogger("rife.bld.extension");
|
||||||
|
var consoleHandler = new ConsoleHandler();
|
||||||
|
|
||||||
|
consoleHandler.setLevel(level);
|
||||||
|
logger.addHandler(consoleHandler);
|
||||||
|
logger.setLevel(level);
|
||||||
|
logger.setUseParentHandlers(false);
|
||||||
|
|
||||||
new PinboardPosterBuild().start(args);
|
new PinboardPosterBuild().start(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@BuildCommand(summary = "Compiles the Kotlin project")
|
@BuildCommand(summary = "Compiles the Kotlin project")
|
||||||
@Override
|
@Override
|
||||||
public void compile() throws IOException {
|
public void compile() throws Exception {
|
||||||
new CompileKotlinOperation()
|
new CompileKotlinOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
|
.compileOptions(new CompileOptions().verbose(true))
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,9 +162,10 @@ public class PinboardPosterBuild extends Project {
|
||||||
}
|
}
|
||||||
|
|
||||||
@BuildCommand(summary = "Generates JaCoCo Reports")
|
@BuildCommand(summary = "Generates JaCoCo Reports")
|
||||||
public void jacoco() throws IOException {
|
public void jacoco() throws Exception {
|
||||||
new JacocoReportOperation()
|
new JacocoReportOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
|
.sourceFiles(srcMainKotlin)
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +187,12 @@ public class PinboardPosterBuild extends Project {
|
||||||
pomRoot();
|
pomRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void publishLocal() throws Exception {
|
||||||
|
super.publishLocal();
|
||||||
|
pomRoot();
|
||||||
|
}
|
||||||
|
|
||||||
@BuildCommand(value = "pom-root", summary = "Generates the POM file in the root directory")
|
@BuildCommand(value = "pom-root", summary = "Generates the POM file in the root directory")
|
||||||
public void pomRoot() throws FileUtilsErrorException {
|
public void pomRoot() throws FileUtilsErrorException {
|
||||||
PomBuilder.generateInto(publishOperation().fromProject(this).info(), dependencies(),
|
PomBuilder.generateInto(publishOperation().fromProject(this).info(), dependencies(),
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PinConfig.kt
|
* PinConfig.kt
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017-2023, Erik C. Thauvin (erik@thauvin.net)
|
* Copyright (c) 2017-2025, Erik C. Thauvin (erik@thauvin.net)
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -38,48 +37,74 @@ import java.time.ZonedDateTime
|
||||||
*
|
*
|
||||||
* Supports of all the [Pinboard API Parameters](https://pinboard.in/api/#posts_add).
|
* Supports of all the [Pinboard API Parameters](https://pinboard.in/api/#posts_add).
|
||||||
*/
|
*/
|
||||||
class PinConfig private constructor(
|
class PinConfig private constructor(builder: Builder) {
|
||||||
val url: String,
|
val url: String = builder.url
|
||||||
val description: String,
|
val description: String = builder.description
|
||||||
val extended: String,
|
val extended = builder.extended
|
||||||
val tags: Array<out String>,
|
val tags = builder.tags
|
||||||
val dt: ZonedDateTime,
|
val dt = builder.dt
|
||||||
val replace: Boolean,
|
val replace = builder.replace
|
||||||
val shared: Boolean,
|
val shared = builder.shared
|
||||||
val toRead: Boolean
|
val toRead = builder.toRead
|
||||||
) {
|
|
||||||
/**
|
/**
|
||||||
* Configures the parameters to add a pin.
|
* Configures the parameters to add a pin.
|
||||||
|
*
|
||||||
|
* @param url The URL of the bookmark.
|
||||||
|
* @param description The title of the bookmark.
|
||||||
*/
|
*/
|
||||||
data class Builder(
|
data class Builder(var url: String, var description: String) {
|
||||||
private var url: String = "",
|
var extended: String = ""
|
||||||
private var description: String = "",
|
var tags: Array<out String> = emptyArray()
|
||||||
private var extended: String = "",
|
var dt: ZonedDateTime = ZonedDateTime.now()
|
||||||
private var tags: Array<out String> = emptyArray(),
|
var replace: Boolean = true
|
||||||
private var dt: ZonedDateTime = ZonedDateTime.now(),
|
var shared: Boolean = true
|
||||||
private var replace: Boolean = true,
|
var toRead: Boolean = false
|
||||||
private var shared: Boolean = true,
|
|
||||||
private var toRead: Boolean = false
|
|
||||||
) {
|
|
||||||
fun url(url: String) = apply { this.url = url }
|
|
||||||
fun description(description: String) = apply { this.description = description }
|
|
||||||
fun extended(extended: String) = apply { this.extended = extended }
|
|
||||||
fun tags(vararg tag: String) = apply { this.tags = tag }
|
|
||||||
fun dt(datetime: ZonedDateTime) = apply { this.dt = datetime }
|
|
||||||
fun replace(replace: Boolean) = apply { this.replace = replace }
|
|
||||||
fun shared(shared: Boolean) = apply { this.shared = shared }
|
|
||||||
fun toRead(toRead: Boolean) = apply { this.toRead = toRead }
|
|
||||||
|
|
||||||
fun build() = PinConfig(
|
/**
|
||||||
url,
|
* The URL of the bookmark.
|
||||||
description,
|
*/
|
||||||
extended,
|
fun url(url: String): Builder = apply { this.url = url }
|
||||||
tags,
|
|
||||||
dt,
|
/**
|
||||||
replace,
|
* The title of the bookmark.
|
||||||
shared,
|
*/
|
||||||
toRead
|
fun description(description: String): Builder = apply { this.description = description }
|
||||||
)
|
|
||||||
|
/**
|
||||||
|
* The description of the bookmark.
|
||||||
|
*/
|
||||||
|
fun extended(extended: String): Builder = apply { this.extended = extended }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of up to 100 tags.
|
||||||
|
*/
|
||||||
|
fun tags(vararg tag: String): Builder = apply { this.tags = tag }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The creation time of the bookmark.
|
||||||
|
*/
|
||||||
|
fun dt(datetime: ZonedDateTime): Builder = apply { this.dt = datetime }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace any existing bookmark with the specified URL. Default `true`.
|
||||||
|
*/
|
||||||
|
fun replace(replace: Boolean): Builder = apply { this.replace = replace }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make bookmark public. Default is `true`.
|
||||||
|
*/
|
||||||
|
fun shared(shared: Boolean): Builder = apply { this.shared = shared }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark the bookmark as unread. Default is `false`.
|
||||||
|
*/
|
||||||
|
fun toRead(toRead: Boolean): Builder = apply { this.toRead = toRead }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds a new configuration.
|
||||||
|
*/
|
||||||
|
fun build() = PinConfig(this)
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
@ -115,7 +140,5 @@ class PinConfig private constructor(
|
||||||
return "Builder(url='$url', description='$description', extended='$extended'," +
|
return "Builder(url='$url', description='$description', extended='$extended'," +
|
||||||
"tags=${tags.contentToString()}, dt=$dt, replace=$replace, shared=$shared, toRead=$toRead)"
|
"tags=${tags.contentToString()}, dt=$dt, replace=$replace, shared=$shared, toRead=$toRead)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PinboardPoster.kt
|
* PinboardPoster.kt
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017-2023, Erik C. Thauvin (erik@thauvin.net)
|
* Copyright (c) 2017-2025, Erik C. Thauvin (erik@thauvin.net)
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PinboardPosterTest.kt
|
* PinboardPosterTest.kt
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017-2023, Erik C. Thauvin (erik@thauvin.net)
|
* Copyright (c) 2017-2025, Erik C. Thauvin (erik@thauvin.net)
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -44,11 +43,13 @@ import kotlin.test.assertFalse
|
||||||
import kotlin.test.assertTrue
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
class PinboardPosterTest {
|
class PinboardPosterTest {
|
||||||
private val url = "http://www.example.com/?random=" + (1000..10000).random()
|
private val url = randomUrl()
|
||||||
private val desc = "This is a test."
|
private val desc = "This is a test."
|
||||||
private val localProps = Paths.get("local.properties")
|
private val localProps = Paths.get("local.properties")
|
||||||
private val isCi = "true" == System.getenv("CI")
|
private val isCi = "true" == System.getenv("CI")
|
||||||
|
|
||||||
|
private fun randomUrl(): String = "https://www.example.com/?random=" + (1000..10000).random()
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testAddPin() {
|
fun testAddPin() {
|
||||||
var poster = PinboardPoster("")
|
var poster = PinboardPoster("")
|
||||||
|
@ -66,6 +67,7 @@ class PinboardPosterTest {
|
||||||
if (!isCi) {
|
if (!isCi) {
|
||||||
poster.logger.level = Level.FINE
|
poster.logger.level = Level.FINE
|
||||||
}
|
}
|
||||||
|
|
||||||
assertTrue(poster.validate(), "validate()")
|
assertTrue(poster.validate(), "validate()")
|
||||||
|
|
||||||
assertTrue(poster.addPin(url, desc), "addPin($url, $desc)")
|
assertTrue(poster.addPin(url, desc), "addPin($url, $desc)")
|
||||||
|
@ -82,7 +84,7 @@ class PinboardPosterTest {
|
||||||
|
|
||||||
assertTrue(poster.validate(), "validate()")
|
assertTrue(poster.validate(), "validate()")
|
||||||
|
|
||||||
var config = PinConfig.Builder().url(url).description(desc).extended("extra")
|
var config = PinConfig.Builder(url, desc).extended("extra")
|
||||||
|
|
||||||
assertTrue(poster.addPin(config.build()), "apiToken: ${Constants.ENV_API_TOKEN}")
|
assertTrue(poster.addPin(config.build()), "apiToken: ${Constants.ENV_API_TOKEN}")
|
||||||
|
|
||||||
|
@ -98,13 +100,17 @@ class PinboardPosterTest {
|
||||||
assertTrue(e.message!!.contains("item already exists"))
|
assertTrue(e.message!!.contains("item already exists"))
|
||||||
}
|
}
|
||||||
|
|
||||||
config = config.replace(true).toRead(true)
|
config = config.description("Yet another test.").replace(true).toRead(true)
|
||||||
assertTrue(poster.addPin(config.build()), "toRead(true)")
|
assertTrue(poster.addPin(config.build()), "toRead(true)")
|
||||||
|
|
||||||
config = config.dt(ZonedDateTime.now())
|
config = config.dt(ZonedDateTime.now())
|
||||||
assertTrue(poster.addPin(config.build()), "dt(now)")
|
assertTrue(poster.addPin(config.build()), "dt(now)")
|
||||||
|
|
||||||
assertTrue(poster.deletePin(url), "deletePin($url)")
|
assertTrue(poster.deletePin(url), "deletePin($url)")
|
||||||
|
|
||||||
|
config = config.url(randomUrl())
|
||||||
|
assertTrue(poster.addPin(config.build()), "add($url)")
|
||||||
|
assertTrue(poster.deletePin(config.url), "delete($url)")
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue