Skip to content

Commit 8882431

Browse files
committed
Reorganize the project directory structure
Java 11 Support Grails 5.0+ and Grace 2022.0+
1 parent 1c3af35 commit 8882431

31 files changed

+400
-118
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Grace CI
22
on:
33
push:
44
branches:
5-
- 'main'
5+
- main
66
pull_request:
77
branches:
8-
- 'main'
8+
- main
99
workflow_dispatch:
1010
jobs:
1111
build:
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
java: ['8', '11']
17+
java: ['11']
1818
env:
1919
WORKSPACE: ${{ github.workspace }}
2020
steps:
@@ -48,11 +48,11 @@ jobs:
4848
uses: actions/checkout@v4
4949
with:
5050
token: ${{ secrets.GITHUB_TOKEN }}
51-
- name: Set up JDK 8
51+
- name: Set up JDK 11
5252
uses: actions/setup-java@v4
5353
with:
5454
distribution: 'adopt'
55-
java-version: 8
55+
java-version: 11
5656
- name: Generate secring file
5757
env:
5858
SECRING_FILE: ${{ secrets.SECRING_FILE }}
@@ -69,4 +69,4 @@ jobs:
6969
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
7070
SECRING_FILE: ${{ secrets.SECRING_FILE }}
7171
with:
72-
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
72+
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg :plugin:publishToSonatype closeAndReleaseSonatypeStagingRepository

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
strategy:
2929
matrix:
30-
java: ['8']
30+
java: ['11']
3131
env:
3232
GIT_USER_NAME: rainboyan
3333
GIT_USER_EMAIL: [email protected]
@@ -70,4 +70,4 @@ jobs:
7070
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
7171
SECRING_FILE: ${{ secrets.SECRING_FILE }}
7272
with:
73-
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
73+
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg :plugin:publishToSonatype closeAndReleaseSonatypeStagingRepository

app/assets/.gitkeep

Whitespace-only changes.

app/conf/application.yml

Lines changed: 99 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
---
12
grails:
2-
profile: web-plugin
3+
profile: web
34
codegen:
4-
defaultPackage: org.graceframework.plugins.inertia
5+
defaultPackage: grace.demos
56
gorm:
67
reactor:
78
# Whether to translate GORM events into Reactor events
@@ -42,3 +43,99 @@ environments:
4243
management:
4344
endpoints:
4445
enabled-by-default: false
46+
47+
---
48+
grails:
49+
mime:
50+
disable:
51+
accept:
52+
header:
53+
userAgents:
54+
- Gecko
55+
- WebKit
56+
- Presto
57+
- Trident
58+
types:
59+
all: '*/*'
60+
atom: application/atom+xml
61+
css: text/css
62+
csv: text/csv
63+
form: application/x-www-form-urlencoded
64+
html:
65+
- text/html
66+
- application/xhtml+xml
67+
js: text/javascript
68+
json:
69+
- application/json
70+
- text/json
71+
multipartForm: multipart/form-data
72+
pdf: application/pdf
73+
rss: application/rss+xml
74+
text: text/plain
75+
hal:
76+
- application/hal+json
77+
- application/hal+xml
78+
xml:
79+
- text/xml
80+
- application/xml
81+
urlmapping:
82+
cache:
83+
maxsize: 1000
84+
converters:
85+
encoding: UTF-8
86+
views:
87+
default:
88+
codec: html
89+
gsp:
90+
encoding: UTF-8
91+
htmlcodec: xml
92+
codecs:
93+
expression: html
94+
scriptlet: html
95+
taglib: none
96+
staticparts: none
97+
98+
---
99+
hibernate:
100+
cache:
101+
queries: false
102+
use_second_level_cache: false
103+
use_query_cache: false
104+
dataSource:
105+
pooled: true
106+
jmxExport: true
107+
driverClassName: org.h2.Driver
108+
username: sa
109+
password: ''
110+
111+
environments:
112+
development:
113+
dataSource:
114+
dbCreate: create-drop
115+
url: jdbc:h2:mem:inertia_dev;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
116+
test:
117+
dataSource:
118+
dbCreate: update
119+
url: jdbc:h2:mem:inertia_test;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
120+
production:
121+
dataSource:
122+
dbCreate: none
123+
url: jdbc:h2:./inertia_prod;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
124+
properties:
125+
jmxEnabled: true
126+
initialSize: 5
127+
maxActive: 50
128+
minIdle: 5
129+
maxIdle: 25
130+
maxWait: 10000
131+
maxAge: 600000
132+
timeBetweenEvictionRunsMillis: 5000
133+
minEvictableIdleTimeMillis: 60000
134+
validationQuery: SELECT 1
135+
validationQueryTimeout: 3
136+
validationInterval: 15000
137+
testOnBorrow: true
138+
testWhileIdle: true
139+
testOnReturn: false
140+
jdbcInterceptors: ConnectionState
141+
defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED

app/conf/logback.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<appender-ref ref="STDOUT" />
1616
</root>
1717
<logger name="org.hibernate.orm.deprecation" level="error" />
18-
<logger name="org.graceframework.plugins.inertia.Application" level="debug" />
18+
<logger name="org.grails.plugins.support" level="debug" />
19+
<logger name="grace.demos.Application" level="debug" />
1920
</configuration>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package grace.demos
2+
3+
class UrlMappings {
4+
5+
static mappings = {
6+
"/$controller/$action?/$id?(.$format)?"{
7+
constraints {
8+
// apply constraints here
9+
}
10+
}
11+
12+
"/"(view:"/index")
13+
"500"(view:'/error')
14+
"404"(view:'/notFound')
15+
}
16+
}

app/init/org/graceframework/plugins/inertia/Application.groovy renamed to app/init/grace/demos/Application.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package org.graceframework.plugins.inertia
1+
package grace.demos
22

33
import grails.boot.Grails
4-
import grails.plugins.metadata.PluginSource
4+
import groovy.transform.CompileStatic
55

6-
@PluginSource
6+
@CompileStatic
77
class Application {
88

99
static void main(String[] args) {

app/init/org/graceframework/plugins/inertia/BootStrap.groovy renamed to app/init/grace/demos/BootStrap.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.graceframework.plugins.inertia
1+
package grace.demos
22

33
class BootStrap {
44

0 commit comments

Comments
 (0)