Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: true
matrix:
java: [ 17, 21 ]
java: [ 21, 25 ]
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v4
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
types: [ published ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_VERSION: '17.0.15' # this must be a specific version for reproducible builds
JAVA_VERSION: '21.0.12' # this must be a specific version for reproducible builds
RELEASE_TAG_PREFIX: 'v'
jobs:
publish:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Install

To install just add to the dependency block in the `build.gradle`

For Grails 8.x (Java 21+)
```groovy
implementation 'io.github.gpc:rendering:8.0.0'
```

For Grails 7.x
```groovy
implementation 'io.github.gpc:rendering:7.0.1'
Expand Down
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/restricted" }
maven { url = "https://repo.grails.org/grails/restricted" }
maven {
url = 'https://repository.apache.org/content/groups/snapshots'
content {
Expand Down Expand Up @@ -44,7 +44,7 @@ ext {

repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/restricted" }
maven { url = "https://repo.grails.org/grails/restricted" }
maven {
url = 'https://repository.apache.org/content/groups/snapshots'
content {
Expand All @@ -58,7 +58,7 @@ dependencies {
compileOnly platform("org.apache.grails:grails-bom:$grailsVersion")
compileOnly 'org.apache.grails:grails-dependencies-starter-web'

api('org.xhtmlrenderer:flying-saucer-pdf:9.9.5')
api('org.xhtmlrenderer:flying-saucer-pdf:10.6.0')
api("org.apache.pdfbox:pdfbox:3.0.8")

testImplementation platform("org.apache.grails:grails-bom:$grailsVersion")
Expand All @@ -69,8 +69,6 @@ dependencies {

}

compileJava.options.release = 17

jar {
exclude "RenderingController**"
exclude "application.groovy"
Expand Down Expand Up @@ -112,6 +110,11 @@ grailsPublish {
]
}

java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
targetCompatibility = JavaVersion.toVersion(javaVersion)
}

compileJava.options.release = javaVersion.toInteger()

apply from: layout.projectDirectory.file('gradle/docs-config.gradle')
9 changes: 7 additions & 2 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ dependencies {
runtimeOnly "cloud.wondrify:asset-pipeline-grails"
runtimeOnly "com.h2database:h2"
runtimeOnly "com.zaxxer:HikariCP"
runtimeOnly "org.fusesource.jansi:jansi"
integrationTestImplementation testFixtures("org.apache.grails:grails-geb")
integrationTestImplementation testFixtures("org.apache.grails.web:grails-web-common")
testImplementation "org.apache.grails:grails-testing-support-datamapping"
testImplementation "org.apache.grails:grails-testing-support-web"
testImplementation "org.spockframework:spock-core"
Expand All @@ -73,7 +73,12 @@ dependencies {

}

compileJava.options.release = 17
java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
targetCompatibility = JavaVersion.toVersion(javaVersion)
}

compileJava.options.release = javaVersion.toInteger()

tasks.withType(Test).configureEach {
useJUnitPlatform()
Expand Down
2 changes: 1 addition & 1 deletion example/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
grailsVersion=7.0.17
grailsVersion=8.0.0
version=0.1
org.gradle.caching=true
org.gradle.daemon=true
Expand Down
Binary file modified example/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion example/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 4 additions & 7 deletions example/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 52 additions & 34 deletions example/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added example/grails-app/assets/images/red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions example/grails-app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// You're free to add application-wide JavaScript to this file, but it's generally better
// to create separate JavaScript files as needed.
//
//= require webjars/jquery/3.7.1/dist/jquery.js
//= require webjars/bootstrap/5.3.7/dist/js/bootstrap.bundle
//= require webjars/jquery/4.0.0/dist/jquery.js
//= require webjars/bootstrap/5.3.8/dist/js/bootstrap.bundle
//= require_self

if (typeof jQuery !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion example/grails-app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require webjars/bootstrap/5.3.7/dist/css/bootstrap
*= require webjars/bootstrap/5.3.8/dist/css/bootstrap
*= require webjars/bootstrap-icons/1.13.1/font/bootstrap-icons
*= require grails
*= require_self
Expand Down
6 changes: 5 additions & 1 deletion example/grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ server:
servlet:
context-path: /rendering
grails:
serverURL: http://localhost:8080/rendering
serverURL: http://localhost:8080/rendering

logging:
level:
root: ERROR
39 changes: 0 additions & 39 deletions example/grails-app/conf/logback-spring.xml

This file was deleted.

8 changes: 8 additions & 0 deletions example/grails-app/views/_relative-css.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<style type="text/css">
body { background-image: url('${asset.assetPath(src: 'red.png')}'); margin: 0; }
</style>
</head>
<body><p>x</p></body>
</html>
2 changes: 1 addition & 1 deletion example/grails-app/views/layouts/main.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="/#"><asset:image class="w-75" src="grails.svg" alt="Grails Logo"/></a>
<a class="navbar-brand" href="${createLink(uri: '/')}"><asset:image class="w-75" src="grails.svg" alt="Grails Logo"/></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down
Loading
Loading