Skip to content
Open
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
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [ master, main ]
tags: [ '*' ]
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need JDK 17, Grails 7 uses Spring 3.5.x which has a minimum Java version of 17

Copy link

@dauer dauer Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, having a working pipeline for the current version might be a good idea.

We can upgrade to 17 when my branch is merged

cache: gradle

- name: Verify Gradle
run: ./gradlew --version

- name: Build and Test
run: ./gradlew clean check assemble --stacktrace

- name: Publish to GitHub Packages (on tag)
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew publish
31 changes: 19 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ group "org.grails.plugins"
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"
apply plugin: 'maven-publish'

repositories {
mavenLocal()
Expand Down Expand Up @@ -44,20 +44,27 @@ dependencies {
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
}
// enable if you wish to package this plugin as a standalone application

bootRepackage.enabled = false
findMainClass.enabled = false

grailsPublish {
if (System.getenv('BINTRAY_USER') || project.hasProperty('bintrayUser')) {
user = System.getenv('BINTRAY_USER') ?: project.property('bintrayUser')
key = System.getenv('BINTRAY_KEY') ?: project.property('bintrayKey')
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = project.group
artifactId = rootProject.name
version = project.version
}
}
githubSlug = 'mrhaki/grails-x-frame-options-plugin'
license {
name = 'Apache-2.0'
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/${System.getenv("GITHUB_REPOSITORY")}")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
title = "X-Frame-Options Plugin"
desc = "Servlet filter that adds a X-FRAME-OPTIONS response header"
developers = [mrhaki:"Hubert A. Klein Ikkink", sergio:"Sergio del Amo Caballero", sbglasius: "Søren Berg Glasius"]
}