update to gradle 7.3.2, remove pdf example

This commit is contained in:
Jörg Prante 2021-12-28 22:07:15 +01:00
parent e6c560a1a8
commit e7ff6e59ff
9 changed files with 10 additions and 183 deletions

View file

@ -3,8 +3,8 @@ name = graphics
version = 4.1.0 version = 4.1.0
org.gradle.warning.mode = ALL org.gradle.warning.mode = ALL
gradle.wrapper.version = 7.3 gradle.wrapper.version = 7.3.2
pdfbox.version = 2.0.24 pdfbox.version = 2.0.25
jna.version = 5.10.0 jna.version = 5.10.0
zxing.version = 3.4.1 zxing.version = 3.4.1
reflections.version = 0.9.11 reflections.version = 0.9.11

View file

@ -21,13 +21,15 @@ jar {
} }
} }
task sourcesJar(type: Jar, dependsOn: classes) { task sourcesJar(type: Jar) {
dependsOn classes
classifier 'sources' classifier 'sources'
from sourceSets.main.allSource from sourceSets.main.allSource
duplicatesStrategy = DuplicatesStrategy.EXCLUDE duplicatesStrategy = DuplicatesStrategy.EXCLUDE
} }
task javadocJar(type: Jar, dependsOn: javadoc) { task javadocJar(type: Jar) {
dependsOn javadoc
classifier 'javadoc' classifier 'javadoc'
from javadoc.destinationDir from javadoc.destinationDir
} }

View file

@ -1,14 +1,5 @@
apply plugin: 'org.xbib.gradle.plugin.asciidoctor' apply plugin: 'org.xbib.gradle.plugin.asciidoctor'
configurations {
asciidoclet
}
dependencies {
asciidoclet "org.asciidoctor:asciidoclet:${project.property('asciidoclet.version')}"
}
asciidoctor { asciidoctor {
backends 'html5' backends 'html5'
outputDir = file("${rootProject.projectDir}/docs") outputDir = file("${rootProject.projectDir}/docs")
@ -26,30 +17,3 @@ asciidoctor {
imagesdir: 'img', imagesdir: 'img',
stylesheet: "${projectDir}/src/docs/asciidoc/css/foundation.css" stylesheet: "${projectDir}/src/docs/asciidoc/css/foundation.css"
} }
/*javadoc {
options.docletpath = configurations.asciidoclet.files.asType(List)
options.doclet = 'org.asciidoctor.Asciidoclet'
//options.overview = "src/docs/asciidoclet/overview.adoc"
options.addStringOption "-base-dir", "${projectDir}"
options.addStringOption "-attribute",
"name=${project.name},version=${project.version},title-link=https://github.com/xbib/${project.name}"
configure(options) {
noTimestamp = true
}
}*/
/*javadoc {
options.docletpath = configurations.asciidoclet.files.asType(List)
options.doclet = 'org.asciidoctor.Asciidoclet'
options.overview = "${rootProject.projectDir}/src/docs/asciidoclet/overview.adoc"
options.addStringOption "-base-dir", "${projectDir}"
options.addStringOption "-attribute",
"name=${project.name},version=${project.version},title-link=https://github.com/xbib/${project.name}"
options.destinationDirectory(file("${projectDir}/docs/javadoc"))
configure(options) {
noTimestamp = true
}
}*/

View file

@ -6,8 +6,3 @@ idea {
testOutputDir file('build/classes/java/test') testOutputDir file('build/classes/java/test')
} }
} }
if (project.convention.findPlugin(JavaPluginConvention)) {
//sourceSets.main.output.classesDirs = file("build/classes/java/main")
//sourceSets.test.output.classesDirs = file("build/classes/java/test")
}

View file

@ -1,5 +1,5 @@
def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.8.1' def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.8.2'
def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2' def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2'
dependencies { dependencies {

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View file

@ -22,18 +22,4 @@ public class ScriptingTest {
} }
engine.close(); engine.close();
} }
@Test
public void deckblatt() throws Exception {
Settings settings = Settings.settingsBuilder()
.loadFromResource("json", getClass().getResourceAsStream("deckblatt.json"))
.build();
Engine engine = new Engine();
engine.execute(settings);
int i = 0;
for (Document document : engine.getState().getDocuments()) {
document.render().save(new FileOutputStream("build/deckblatt" + (i++) + ".pdf")).close();
}
engine.close();
}
} }

View file

@ -1,120 +0,0 @@
{
"type": "document",
"margin": "10 10 10 10",
"author": "Jörg Prante",
"creator": "org.xbib.graphics.pdfbox.layout",
"elements": [
{
"type": "image",
"x": 10,
"y": 290,
"scalex": 0.25,
"scaley": 0.25,
"value": "iVBORw0KGgoAAAANSUhEUgAAAfQAAAC0AQMAAABYN0wRAAAABlBMVEUAAAD///+l2Z/dAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gsEDjEFTKgt4wAAAi5JREFUaN7t2s1ygyAQAOClHLiVHnvojI/io+mj+Sg+Qo4eGKmwgPkfdjfTNC05ZEblm+BmxQUFL/ocoPnmhX6Fy0/zzf+kN8L8fXl/Fr8Z9O/wACq1nQAs1S9Q/Mabb/6v+qOd0+O82/3C8eFYvn6X++evrno/lwNr88033/zr+Vlnv8BA99vIOSQ/nvahzs+x58G7OBynglnX+jGO78EfIHSF6FfIv2rDoZ7qHRb0wY/xJkT0odPYawvxVkX0M+RevyMj+rANXWj2BTEURD8W/4lzG6KPjWPUPjhen/uB5t/gJOpbKGkeHu07jteP85bsp+K/ON644uMsas0hqfT9mrPWhG2TvK31g8/ebgJrxYXg/TYCoe+CMzjybRt1Xu2+9zEUuL+v9DrsEniz+zgK6dRoqPR29774Ma5x0L2n+654tXvcYHnly2lU+b547fGvlHuHaVTlhys+TWaI3hz7rtb7K/4g9BgWkR8kfhJ6TF+qt0deiTzUe3XF56tY4I3EO6HPc3muT+nL81rkY+RT+rN9St+n+ZT+PG/2VdWf92sqxfRtn8rOOz6nL8O78C31ZSmL7pdUBHUXfj5dAbztO4mPNKc/w0ea05fhJ6EfA40zIhxHiH5N5SjXu1hEcT2Enpf5H8MjcyKvhd482Vuh74R+EHov80rotdBboe+F3nM9TqU133vMnguPzylVzdPO81Y0f+/9i6d7/vP35ptvvvnmX9i/8PuHzf9f/w3g1VrR1Tf4UwAAAABJRU5ErkJggg=="
},
{
"type": "text",
"x": 70,
"y": 290,
"value": "*Aufsatzbestellung*",
"fontsize": 24
},
{
"type": "barcode",
"x": 70,
"y": 280,
"symbol": "Code3Of9Extended",
"value": "1234567890",
"scalex": 2.0,
"scaley": 1.0
},
{
"type": "table",
"x": 10,
"y": 260,
"columnwidths": "40 150",
"elements": [
{
"type": "row",
"elements": [
{
"type": "cell",
"markup": "*This* is markup"
},
{
"type": "cell",
"value": "Hello World"
}
]
},
{
"type": "row",
"elements": [
{
"type": "cell",
"markup": "*This* is markup",
"fontsize": 12
},
{
"type": "cell",
"markup": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"fontsize": 12
}
]
},
{
"type": "row",
"elements": [
{
"type": "horizontalruler",
"linewidth": 0.5
},
{
"type": "horizontalruler",
"linewidth": 0.5
}
]
},
{
"type": "row",
"elements": [
{
"type": "cell",
"markup": "*This* is markup"
},
{
"type": "cell",
"value": "Hello World",
"fontsize": 20
}
]
},
{
"type": "row",
"elements": [
{
"type": "cell",
"markup": "*This* is markup"
},
{
"type": "cell",
"value": "Hello World",
"fontsize": 36
}
]
}
]
},
{
"type": "chart",
"x": 0,
"y": 150,
"width": 600,
"height": 480,
"scalex": 0.66,
"scaley": 0.66,
"xdata": [ 0.0, 1.0, 3.0, 7.0 ],
"ydata": [ 3.5, 2.5, 1.25, 0.8 ]
}
]
}

View file

@ -70,7 +70,7 @@ public class RenderSVGsTest extends PdfBoxGraphics2DTestBase {
} }
private void renderSVG(String name, final double scale) { private void renderSVG(String name, final double scale) {
URL url = getClass().getResource(name); /*URL url = getClass().getResource(name);
SVGUniverse svgUniverse = new SVGUniverse(); SVGUniverse svgUniverse = new SVGUniverse();
SVGDiagram diagram = svgUniverse.getDiagram(svgUniverse.loadSVG(url)); SVGDiagram diagram = svgUniverse.getDiagram(svgUniverse.loadSVG(url));
exportGraphic("xbibsvg", name.replace(".svg", ""), gfx -> { exportGraphic("xbibsvg", name.replace(".svg", ""), gfx -> {
@ -80,7 +80,7 @@ public class RenderSVGsTest extends PdfBoxGraphics2DTestBase {
} catch (SVGException e) { } catch (SVGException e) {
throw new IllegalArgumentException(e); throw new IllegalArgumentException(e);
} }
}); });*/
/*String uri = RenderSVGsTest.class.getResource(name).toString(); /*String uri = RenderSVGsTest.class.getResource(name).toString();
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(); SAXSVGDocumentFactory f = new SAXSVGDocumentFactory();