Skip to content

Commit

Permalink
Merge pull request #44 from bkoehm/bkoehm.5.0.x
Browse files Browse the repository at this point in the history
Grails 7: grails-spring-security-acl
  • Loading branch information
bkoehm authored Nov 21, 2024
2 parents ad71fc4 + 775f614 commit 60f869f
Show file tree
Hide file tree
Showing 39 changed files with 804 additions and 898 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Java CI
on:
push:
branches:
- '[5-9]+.[0-9]+.x'
pull_request:
branches:
- '[5-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Run Tests
if: github.event_name == 'pull_request'
id: tests
uses: gradle/gradle-build-action@v2
with:
arguments: check -Dgeb.env=chromeHeadless
- name: Run Build
if: github.event_name == 'push'
id: build
uses: gradle/gradle-build-action@v2
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: build -Dgeb.env=chromeHeadless
- name: Publish Test Report
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Publish to repo.grails.org
id: publish
uses: gradle/gradle-build-action@v2
if: steps.build.outcome == 'success' && github.event_name == 'push'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
- name: Build Documentation
id: docs
uses: gradle/gradle-build-action@v2
with:
arguments: docs:docs
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Build Status](https://travis-ci.org/grails-plugins/grails-spring-security-acl.svg?branch=master)

Grails Spring Security ACL Plugin
==================================

Expand Down
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
subprojects {
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.seleniumhq.selenium') {
details.useVersion(seleniumVersion)
}
}
}
}
69 changes: 53 additions & 16 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ buildscript {
maven { url 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11'
classpath 'org.asciidoctor:asciidoctor-gradle-jvm:4.0.3'
classpath "org.asciidoctor:asciidoctor-gradle-jvm-epub:4.0.3"
classpath "org.asciidoctor:asciidoctor-gradle-jvm-pdf:4.0.3"
classpath "org.asciidoctor:asciidoctor-gradle-jvm-gems:4.0.3"
}
}

import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'org.asciidoctor.convert'
apply plugin: "org.asciidoctor.jvm.gems"
apply plugin: 'org.asciidoctor.jvm.convert'
apply plugin: "org.asciidoctor.jvm.pdf"
apply plugin: "org.asciidoctor.jvm.epub"

def asciidoctorAttributes = [
copyright : 'Apache License, Version 2.0',
Expand All @@ -34,28 +37,62 @@ def asciidoctorAttributes = [
projectVersion : project.projectVersion,
]

repositories {
mavenCentral()
maven { url 'https://repo.grails.org/grails/core' }
ruby.gems()
}

import org.apache.tools.ant.taskdefs.condition.Os
import org.asciidoctor.gradle.AsciidoctorTask
dependencies {
asciidoctorGems 'rubygems:rouge:4.4.0'
}

tasks.withType(AsciidoctorTask) {
asciidoctor {
sourceDir file('src/docs')
sources {
include 'index.adoc'
}
outputDir = new File(buildDir, 'docs')
attributes asciidoctorAttributes
outputDir new File(buildDir, 'docs')
separateOutputDirs = false
}

asciidoctorPdf {
dependsOn asciidoctorGemsPrepare
sourceDir = file('src/docs')
sources {
include 'index.adoc'
}
outputDir = new File(buildDir, 'docs')

asciidoctorj {
requires 'rouge'
attributes asciidoctorAttributes
}
}

asciidoctorEpub {
dependsOn asciidoctorGemsPrepare
sourceDir = file('src/docs')
sources {
include 'index.adoc'
}
outputDir = new File(buildDir, 'docs')

task asciidoc(type: AsciidoctorTask, description: 'Generates single-page HTML, PDF, and EPUB3') {
group 'documentation'
backends 'html5', 'pdf', 'epub3'
asciidoctorj {
requires 'rouge'
attributes asciidoctorAttributes
}

ebookFormats = ["EPUB3"]
}

tasks.named("asciidoctor").configure {
dependsOn = ['asciidoctorPdf', 'asciidoctorEpub']
}

task docs(dependsOn: [asciidoc]) {
group 'documentation'
tasks.register("docs") {
group = "documentation"
dependsOn = ["asciidoctor"]
doLast {
File dir = new File(buildDir, 'docs')
['epub', 'pdf'].each { String ext ->
Expand All @@ -73,4 +110,4 @@ task docs(dependsOn: [asciidoc]) {
include '**/*.png'
}
}
}
}
4 changes: 2 additions & 2 deletions docs/src/docs/code/grails-app/views/error.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<g:if test="${Throwable.isInstance(exception)}">
<g:renderException exception="${exception}" />
</g:if>
<g:elseif test="${request.getAttribute('javax.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('javax.servlet.error.exception')}" />
<g:elseif test="${request.getAttribute('jakarta.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('jakarta.servlet.error.exception')}" />
</g:elseif>
<g:else>
<ul class="errors">
Expand Down
19 changes: 10 additions & 9 deletions docs/src/docs/index.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:includedir: src/docs/
= Spring Security ACL Plugin - Reference Documentation
Burt Beckwith

Expand All @@ -8,20 +9,20 @@ Burt Beckwith
:toclevels: 2
:numbered:

include::introduction.adoc[]
include::{includedir}introduction.adoc[]

include::installing.adoc[]
include::{includedir}installing.adoc[]

include::usage.adoc[]
include::{includedir}usage.adoc[]

include::tutorial.adoc[]
include::{includedir}tutorial.adoc[]

include::sampleApp.adoc[]
include::{includedir}sampleApp.adoc[]

include::AclUtilService.adoc[]
include::{includedir}AclUtilService.adoc[]

include::Scripts.adoc[]
include::{includedir}Scripts.adoc[]

include::TagLibraries.adoc[]
include::{includedir}TagLibraries.adoc[]

include::history.adoc[]
include::{includedir}history.adoc[]
91 changes: 44 additions & 47 deletions functional-test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.7"
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
classpath "gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:1.4"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:5.0.1"
classpath "org.grails.plugins:hibernate5:$gormVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:3.2"
}
}

Expand All @@ -18,7 +18,7 @@ apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.energizedwork.webdriver-binaries"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"

Expand All @@ -28,56 +28,53 @@ repositories {
}

dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
compile "org.grails.plugins:gsp"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails:grails-web-boot"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core-jakarta:$hibernateCoreVersion"
implementation "org.grails.plugins:gsp"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.7"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "org.apache.tomcat:tomcat-jdbc"
runtime "com.h2database:h2"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails:grails-web-testing-support"
testCompile "io.micronaut:micronaut-http-client:$micronautVersion"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.6.0"
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.6.0"
testCompile "org.seleniumhq.selenium:selenium-api:3.6.0"
compile project(':spring-security-acl')
}

bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
sourceResources sourceSets.main
}
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:5.0.1"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "com.h2database:h2"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"
integrationTestImplementation testFixtures('org.grails.plugins:geb')

webdriverBinaries {
chromedriver '2.35'
geckodriver '0.18.0'
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-safari-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
implementation project(':spring-security-acl')
}

tasks.withType(Test) {
useJUnitPlatform()
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
if (System.getenv('CHROMEWEBDRIVER')) {
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
}
if (System.getenv('GECKOWEBDRIVER')) {
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}

beforeTest { descriptor -> logger.quiet " -- $descriptor" }
testLogging {
events "passed", "skipped", "failed"
Expand Down
Loading

0 comments on commit 60f869f

Please sign in to comment.