Skip to content

Commit

Permalink
Update Examples
Browse files Browse the repository at this point in the history
Upgrade to Grace 2023.1.0-M1

Closes gh-3
  • Loading branch information
rainboyan committed Oct 11, 2024
1 parent daae6c4 commit ceefb3d
Show file tree
Hide file tree
Showing 47 changed files with 471 additions and 40 deletions.
2 changes: 2 additions & 0 deletions examples/pubsub-demo/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gradlew text eol=lf
gradlew.bat text eol=crlf
11 changes: 11 additions & 0 deletions examples/pubsub-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# backup

This project is generated by Grace v2023.1.0-M1.

### Versions

* Grace 2023.1.0-M1
* Groovy 4.0.23
* Spring Boot 3.1.12
* Spring Framework 6.0.23
* Tomcat 10.1.30
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ grails:
urlmapping:
cache:
maxsize: 1000
controllers:
defaultScope: singleton
converters:
encoding: UTF-8
views:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
<appender-ref ref="STDOUT" />
</root>
<logger name="pubsub.demo.Application" level="debug"/>
<logger name="org.grails.plugins.support" level="debug"/>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package pubsub.demo

import grails.boot.Grails
import org.springframework.context.annotation.ComponentScan

@ComponentScan
class Application {
static void main(String[] args) {
Grails.run(Application, args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ model {
}

json {
message "Welcome to Grails!"
message "Welcome to Grace!"
environment Environment.current.name
appversion grailsApplication.metadata.getApplicationVersion()
grailsversion GrailsUtil.grailsVersion
graceversion GrailsUtil.grailsVersion
appprofile grailsApplication.config.getProperty('grails.profile')
groovyversion GroovySystem.getVersion()
jvmversion System.getProperty('java.version')
Expand Down
File renamed without changes.
112 changes: 79 additions & 33 deletions examples/pubsub-demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,57 +1,103 @@
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
}
dependencies {
classpath "org.graceframework.plugins:views-gradle:5.0.0"
}
plugins {
id "eclipse"
id "idea"
id "war"
id "org.graceframework.grace-web"
// id "org.graceframework.asset-pipeline"
id "com.github.erdi.webdriver-binaries"
// id "org.graceframework.grace-gsp"
id "org.graceframework.plugins.views-json"
}

apply plugin: "org.graceframework.plugins.views-json"
group "grace.apps"

repositories {
mavenCentral()
}

configurations {
developmentOnly
}

dependencies {
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
developmentOnly("org.springframework.boot:spring-boot-devtools")
console "org.graceframework:grace-console"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.graceframework:grace-boot"
implementation "org.graceframework:grace-core"
implementation "org.graceframework:grace-logging"
implementation "org.graceframework:grace-plugin-codecs"
implementation "org.graceframework:grace-plugin-controllers"
implementation "org.graceframework:grace-plugin-datasource"
implementation "org.graceframework:grace-plugin-converters"
implementation "org.graceframework:grace-plugin-databinding"
implementation "org.graceframework:grace-plugin-datasource"
implementation "org.graceframework:grace-plugin-domain-class"
implementation "org.graceframework:grace-plugin-i18n"
implementation "org.graceframework:grace-plugin-interceptors"
implementation "org.graceframework:grace-plugin-management"
implementation "org.graceframework:grace-plugin-rest"
implementation "org.graceframework:grace-plugin-services"
implementation "org.graceframework:grace-plugin-url-mappings"
implementation project(":grace-plugin-async")
runtimeOnly project(":grace-events-rxjava")
runtimeOnly project(":grace-async-rxjava")
implementation "org.graceframework:grace-logging"
implementation "org.graceframework.plugins:async"
implementation "org.graceframework.plugins:cache"
implementation "org.graceframework.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
implementation "org.hibernate:hibernate-ehcache:$hibernateCoreVersion"
implementation "org.graceframework.plugins:database-migration"
implementation "org.graceframework.plugins:events"
implementation "org.graceframework.plugins:views-json"
implementation "org.graceframework.plugins:views-json-templates"
console "org.graceframework:grace-console"
profile "org.graceframework.profiles:rest-api"
// implementation "org.graceframework.plugins:fields"
// implementation "org.graceframework:grace-plugin-gsp"
implementation "org.graceframework.plugins:hibernate"
// implementation "org.graceframework.plugins:scaffolding"
runtimeOnly "org.graceframework:grace-events-rxjava"
runtimeOnly "org.graceframework:grace-async-rxjava"
profile "org.graceframework.profiles:web"
runtimeOnly "org.graceframework.plugins:asset-pipeline-plugin:6.1.0-M1"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
testImplementation "org.graceframework:grace-test-support"
testImplementation "org.mockito:mockito-core"
testImplementation "org.graceframework.plugins:geb"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:4.2.2"
testImplementation "org.seleniumhq.selenium:selenium-api:4.2.2"
testImplementation "org.seleniumhq.selenium:selenium-support:4.2.2"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:4.2.2"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:4.2.2"
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

tasks.withType(Jar) {
configure {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}

testImplementation "org.graceframework:grace-plugin-testing"
testImplementation "org.graceframework:grace-gorm-testing-support"
testImplementation "org.graceframework:grace-web-testing-support"
testImplementation "io.micronaut:micronaut-http-client:$micronautVersion"
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}

tasks.withType(Test) {
useJUnitPlatform()
}

webdriverBinaries {
chromedriver {
version = '126.0.6478.126'
fallbackTo32Bit = true
}
geckodriver '0.33.0'
}

bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
sourceResources sourceSets.main
tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')
systemProperty 'webdriver.gecko.driver', System.getProperty('webdriver.gecko.driver')
}
13 changes: 13 additions & 0 deletions examples/pubsub-demo/buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories {
mavenCentral()
maven { url "https://repo.gradle.org/gradle/libs-releases" }
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
implementation "org.graceframework:grace-gradle-plugin:2023.1.0-M1"
// implementation "org.graceframework.plugins:asset-pipeline-gradle:6.1.0-M1"
implementation "org.graceframework.plugins:database-migration:6.1.0-M1"
implementation "org.graceframework.plugins:views-gradle:6.1.0-M1"
implementation "com.github.erdi:webdriver-binaries-gradle-plugin:3.2"
}
2 changes: 2 additions & 0 deletions examples/pubsub-demo/db/migrations/changelog.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
databaseChangeLog = {
}
7 changes: 6 additions & 1 deletion examples/pubsub-demo/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
graceVersion=2023.0.0-M1
graceVersion=2023.1.0-M1
groovyVersion=4.0.23
version=0.0.1-SNAPSHOT
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
Binary file not shown.
8 changes: 8 additions & 0 deletions examples/pubsub-demo/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ceefb3d

Please sign in to comment.