Skip to content

Commit

Permalink
Merge branch 'master' into feature/gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sbglasius authored Dec 29, 2023
2 parents 5c119f9 + 8ce11bd commit 7ac5a68
Show file tree
Hide file tree
Showing 33 changed files with 401 additions and 278 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Java CI
on:
push:
branches:
- master
- upgrade/grails4
pull_request:
branches:
- master
- upgrade/grails4
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
build:
permissions:
contents: read # to fetch code (actions/checkout)
checks: write # to publish result as PR check (scacap/action-surefire-report)

runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Run Tests
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
id: tests
uses: gradle/gradle-build-action@v2
with:
arguments: check
- name: Run Build
if: github.event_name == 'push'
id: build
uses: gradle/gradle-build-action@v2
with:
arguments: build
27 changes: 25 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
release:
runs-on: ubuntu-latest
env:
GIT_USER_NAME: sbglasius
GIT_USER_EMAIL: soeren@glasius.dk
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -23,6 +23,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Sonatype OSSRH
id: publish
if: steps.assemble.outcome == 'success'
uses: gradle/gradle-build-action@v2
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand Down Expand Up @@ -54,6 +55,28 @@ jobs:
message: 'Set project version to next SNAPSHOT'
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Build documentation
id: asciidoctor
uses: gradle/gradle-build-action@v2
env:
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }}
with:
arguments: -Pversion="${RELEASE_VERSION}"
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Publish to Github Pages
if: success()
uses: micronaut-projects/github-pages-deploy-action@master
env:
BETA: ${{ steps.get_version.outputs.isPrerelase }}
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/asciidoc
DOC_FOLDER: latest
COMMIT_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ secrets.GIT_USER_NAME }}
VERSION: ${{ steps.get_version.outputs.version-without-v }}
- name: Run post-release
if: success()
uses: micronaut-projects/github-actions/post-release@master
Expand Down
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

207 changes: 154 additions & 53 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,77 +1,178 @@
buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1'
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
}
}
plugins {
id 'org.asciidoctor.jvm.convert' version '3.2.0'
}

version project.projectVersion
group "org.grails.plugins"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin: "org.grails.grails-plugin"
apply plugin: "org.grails.grails-gsp"
apply plugin: "org.grails.grails-plugin-publish"

ext {
commonBuild = 'https://raw.githubusercontent.com/grails/grails-common-build/1549696f8d1a6bce3d84db9c4c1bfde61eddf175'
group 'org.grails.plugins'

}
apply plugin: 'org.grails.grails-plugin'
apply plugin: 'org.grails.grails-gsp'
apply plugin: "org.grails.grails-doc"
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "io.github.gradle-nexus.publish-plugin"

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}

dependencies {
provided 'org.springframework.boot:spring-boot-starter-logging'
provided "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframework.boot:spring-boot-autoconfigure"
provided "org.springframework.boot:spring-boot-starter-tomcat"
provided 'org.springframework.boot:spring-boot-starter-logging'
provided "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframework.boot:spring-boot-autoconfigure"
provided "org.springframework.boot:spring-boot-starter-tomcat"

provided "org.grails:grails-web-boot"
provided "org.grails:grails-web-boot"
provided "org.grails:grails-dependencies"
provided "javax.servlet:javax.servlet-api:$servletApiVersion"

compile "org.grails:scaffolding-core:$scaffoldingVersion"

testCompile "org.grails:grails-web-testing-support:2.0.0.RC1"
testCompile "org.grails:grails-gorm-testing-support:2.0.0.RC1"
compile "org.grails:scaffolding-core"

testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails:grails-gorm-testing-support"

console "org.grails:grails-console"

testCompile 'org.javassist:javassist:3.29.0-GA'
testCompile "org.codehaus.groovy:groovy-dateutil"
testCompile "cglib:cglib-nodep:2.2.2"
testCompile("org.jodd:jodd-wot:$joddWotVersion") {
exclude module: 'slf4j-api'
exclude module: 'asm'
}
}

tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}

console "org.grails:grails-console"
publishing {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = 'jms'
version = project.version

testCompile 'javassist:javassist:3.12.0.GA'
testCompile "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
testCompile "cglib:cglib-nodep:$cglibNodepVersion"
testCompile("org.jodd:jodd-wot:$joddWotVersion") {
exclude module: 'slf4j-api'
exclude module: 'asm'
}
from components.java
artifact sourcesJar
artifact javadocJar

pom {
name = 'Jms'
description = 'JMS integration for Grails'
url = 'https://github.com/gpc/jms'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'brownj'
name = 'Jeff Scott Brown'
email = 'brownj@objectcomputing.com'
}
developer {
id = 'sbglasius'
name = 'Søren Berg Glasius'
email = 'soeren+gpc@glasius.dk'
}
}
scm {
connection = 'scm:git:git://github.com/gpc/jms.git'
developerConnection = 'scm:git:https://github.com/gpc/jms.git'
url = 'https://github.com/gpc/jms'
}
}
}
}
}

grailsPublish {
userOrg = "grails"
githubSlug = project.githubSlug
license {
name = 'Apache-2.0'
}
title = project.title
desc = project.projectDesc

developers = [
graemerocher: "Graeme Rocher",
robfletcher: "Rob Fletcher",
sbglasius: "Søren Berg Glasius"
]
ext."signing.keyId" = project.findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY_ID')
ext."signing.password" = project.findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')
ext."signing.secretKeyRingFile" = project.findProperty('signing.secretKeyRingFile') ?: (System.getenv('SIGNING_PASSPHRASE') ?: "${System.getProperty('user.home')}/.gnupg/secring.gpg")

ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

afterEvaluate {
signing {
required { isReleaseVersion }
sign publishing.publications.maven
}
}

apply from: "${commonBuild}/common-docs.gradle"
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}

nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.findProperty('sonatypeOss2Username') ?: ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.findProperty("sonatypeOss2Password") ?: ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.findProperty("sonatypeOssStagingProfileIdJms") ?: ''

nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
}
}

asciidoctor {
resources {
from('src/docs/images')
into "./images"
}
sources {
include 'index.adoc'
}
attributes 'experimental': 'true',
'compat-mode': 'true',
'toc': 'left',
'icons': 'font',
'version': project.version,
'sourcedir': 'src/main/groovy'
baseDirFollowsSourceDir()
outputDir = "${buildDir}/asciidoc"
}

task apiDocs(type: Copy) {
from groovydoc.outputs.files
into file("${buildDir}/asciidoc/api")
}

asciidoctor.dependsOn(apiDocs)

task snapshotVersion {
doLast {
if (!project.version.endsWith('-SNAPSHOT')) {
ant.propertyfile(file: "gradle.properties") {
entry(key: "version", value: "${project.version}-SNAPSHOT")
}
}
}
}
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
projectVersion=3.0.0.BUILD-SNAPSHOT
#projectVersion=2.2.7
grailsVersion=4.0.0.M1
grailsVersion=4.1.2
scaffoldingVersion=2.0.0.RC1
groovyVersion=2.5.6
cglibNodepVersion=3.2.9
joddWotVersion=3.3.8
servletApiVersion=4.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,10 @@ class FormFieldsTagLib {
}

private List<String> resolvePropertyNames(PersistentEntity domainClass, Map attrs) {
if (attrs.containsKey('properties')) {
if (attrs.containsKey('order')) {
return getList(attrs.order)
}
else if (attrs.containsKey('properties')) {
return getList(attrs.remove('properties'))
} else {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= My Title
:version: 2.1.4-SNAPSHOT
= Fields Plugin
:version: 3.0.0-SNAPSHOT
:source-highlighter: coderay
:imagesdir: ./images

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 7ac5a68

Please sign in to comment.