Skip to content

Commit

Permalink
Grace: migrate examples to Grace
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Mar 2, 2024
1 parent e8b4242 commit a56a6a8
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 78 deletions.
38 changes: 19 additions & 19 deletions examples/grails-data-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
// mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails.plugins:views-gradle:$grailsViewsVersion"
classpath "org.graceframework:grace-gradle-plugin:$graceVersion"
classpath "org.graceframework.plugins:views-gradle:$graceViewsVersion"
}
}

group "examples"

apply plugin:"org.grails.grails-web"
apply plugin:"org.grails.plugins.views-json"
apply plugin:"org.graceframework.grace-web"
apply plugin:"org.graceframework.plugins.views-json"

dependencies {
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.graceframework:grace-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-plugin-codecs"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-datasource"
implementation "org.grails:grails-boot"
implementation "org.grails:grails-logging"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:events"
implementation project(":grails-plugin")
implementation "org.graceframework:grace-plugin-codecs"
implementation "org.graceframework:grace-plugin-services"
implementation "org.graceframework:grace-plugin-datasource"
implementation "org.graceframework:grace-boot"
implementation "org.graceframework:grace-logging"
implementation "org.graceframework.plugins:cache"
implementation "org.graceframework.plugins:events"
implementation project(":grace-plugin")
implementation "org.hibernate:hibernate-core:$hibernate5Version"
implementation "org.grails.plugins:views-json"
implementation "org.grails.plugins:views-json-templates"
implementation 'org.grails.plugins:spring-security-rest:3.0.1'
profile "org.grails.profiles:rest-api"
implementation "org.graceframework.plugins:views-json"
implementation "org.graceframework.plugins:views-json-templates"
implementation 'org.graceframework.plugins:spring-security-rest:3.0.1'
profile "org.graceframework.profiles:rest-api"
runtimeOnly "org.glassfish.web:el-impl:2.2.1-b05"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "javax.xml.bind:jaxb-api:2.3.1"
Expand Down
23 changes: 7 additions & 16 deletions examples/grails3-database-per-tenant/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
group "examples"

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == "org.springframework.boot") {
details.useVersion(springBootVersion)
}
}
}

// grails {
// agent {
// enabled = false
Expand All @@ -20,19 +12,18 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "javax.servlet:javax.servlet-api:$servletApiVersion"
implementation "org.grails:grails-boot:$grailsVersion"
implementation "org.grails:grails-core:$grailsVersion"
implementation project(":grails-plugin")

implementation "org.graceframework:grace-boot:$graceVersion"
implementation "org.graceframework:grace-core:$graceVersion"
implementation project(":grace-plugin")

implementation "org.hibernate:hibernate-core:$hibernate5Version"

runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
runtimeOnly "org.graceframework.plugins:asset-pipeline-plugin:$assetPipelineVersion"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.yaml:snakeyaml:$snakeyamlVersion"
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
runtimeOnly "org.grails.plugins:fields:$fieldsVersion"
runtimeOnly "org.grails.plugins:scaffolding:$scaffoldingVersion"
runtimeOnly "org.graceframework.plugins:fields:$fieldsVersion"
runtimeOnly "org.graceframework.plugins:scaffolding:$scaffoldingVersion"

testImplementation ("org.grails:grails-test-support")
testImplementation ("org.graceframework:grace-test-support")
}
18 changes: 9 additions & 9 deletions examples/grails3-hibernate5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "javax.servlet:javax.servlet-api:$servletApiVersion"
implementation "org.grails:grails-boot:$grailsVersion"
implementation "org.grails:grails-core:$grailsVersion"
implementation "org.grails:grails-plugin-rest:$grailsVersion"
implementation project(":grails-plugin")
implementation "org.graceframework:grace-boot:$graceVersion"
implementation "org.graceframework:grace-core:$graceVersion"
implementation "org.graceframework:grace-plugin-rest:$graceVersion"
implementation project(":grace-plugin")

implementation "org.hibernate:hibernate-core:$hibernate5Version"
implementation "org.hibernate:hibernate-ehcache:$hibernate5Version"

runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
runtimeOnly "org.graceframework.plugins:asset-pipeline-plugin:$assetPipelineVersion"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.yaml:snakeyaml:$snakeyamlVersion"
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
runtimeOnly "org.grails.plugins:fields:$fieldsVersion"
runtimeOnly "org.grails.plugins:scaffolding:$scaffoldingVersion"
runtimeOnly "org.graceframework.plugins:fields:$fieldsVersion"
runtimeOnly "org.graceframework.plugins:scaffolding:$scaffoldingVersion"

testImplementation("org.grails:grails-test-support")
testImplementation("org.graceframework:grace-test-support")

testImplementation("org.grails.plugins:geb") {
testImplementation("org.graceframework.plugins:geb") {
exclude group: 'org.gebish', module: 'geb-spock'
}
testImplementation "org.gebish:geb-spock:$gebVersion"
Expand Down
16 changes: 8 additions & 8 deletions examples/grails3-multiple-datasources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "javax.servlet:javax.servlet-api:$servletApiVersion"
implementation "org.grails:grails-boot:$grailsVersion"
implementation "org.grails:grails-core:$grailsVersion"
implementation project(":grails-plugin")
implementation "org.graceframework:grace-boot:$graceVersion"
implementation "org.graceframework:grace-core:$graceVersion"
implementation project(":grace-plugin")

implementation "org.hibernate:hibernate-core:$hibernate5Version"

runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
runtimeOnly "org.graceframework.plugins:asset-pipeline-plugin:$assetPipelineVersion"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
runtimeOnly "org.grails.plugins:fields:$fieldsVersion"
runtimeOnly "org.grails.plugins:scaffolding:$scaffoldingVersion"
runtimeOnly "org.graceframework.plugins:fields:$fieldsVersion"
runtimeOnly "org.graceframework.plugins:scaffolding:$scaffoldingVersion"

testImplementation "org.grails:grails-test-support"
testImplementation "org.grails.plugins:geb"
testImplementation "org.graceframework:grace-test-support"
testImplementation "org.graceframework.plugins:geb"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-safari-driver:$seleniumSafariDriverVersion"
Expand Down
14 changes: 7 additions & 7 deletions examples/grails3-partitioned-multi-tenancy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "javax.servlet:javax.servlet-api:$servletApiVersion"
implementation "org.grails:grails-boot:$grailsVersion"
implementation "org.grails:grails-core:$grailsVersion"
implementation project(":grails-plugin")
implementation "org.graceframework:grace-boot:$graceVersion"
implementation "org.graceframework:grace-core:$graceVersion"
implementation project(":grace-plugin")

implementation "org.hibernate:hibernate-core:$hibernate5Version"

runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
runtimeOnly "org.graceframework.plugins:asset-pipeline-plugin:$assetPipelineVersion"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.yaml:snakeyaml:$snakeyamlVersion"
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
runtimeOnly "org.grails.plugins:fields:$fieldsVersion"
runtimeOnly "org.grails.plugins:scaffolding:$scaffoldingVersion"
runtimeOnly "org.graceframework.plugins:fields:$fieldsVersion"
runtimeOnly "org.graceframework.plugins:scaffolding:$scaffoldingVersion"

testImplementation "org.grails:grails-test-support"
testImplementation "org.graceframework:grace-test-support"
}
16 changes: 8 additions & 8 deletions examples/grails3-schema-per-tenant/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "javax.servlet:javax.servlet-api:$servletApiVersion"
implementation "org.grails:grails-core:$grailsVersion"
implementation "org.grails:grails-boot:$grailsVersion"
implementation project(":grails-plugin")
implementation "org.graceframework:grace-core:$graceVersion"
implementation "org.graceframework:grace-boot:$graceVersion"
implementation project(":grace-plugin")

implementation "org.hibernate:hibernate-core:$hibernate5Version"

runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
runtimeOnly "org.graceframework.plugins:asset-pipeline-plugin:$assetPipelineVersion"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.yaml:snakeyaml:$snakeyamlVersion"
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
runtimeOnly "org.grails.plugins:fields:$fieldsVersion"
runtimeOnly "org.grails.plugins:scaffolding:$scaffoldingVersion"
runtimeOnly "org.graceframework.plugins:fields:$fieldsVersion"
runtimeOnly "org.graceframework.plugins:scaffolding:$scaffoldingVersion"

testImplementation "org.grails:grails-test-support"
testImplementation "org.grails.plugins:geb"
testImplementation "org.graceframework:grace-test-support"
testImplementation "org.graceframework.plugins:geb"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-safari-driver:$seleniumSafariDriverVersion"
Expand Down
7 changes: 0 additions & 7 deletions examples/spring-boot-hibernate5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ apply plugin:"groovy"

group 'examples'

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if(details.requested.group == 'org.codehaus.groovy' && details.requested.name.startsWith('groovy')) {
details.useVersion(groovyVersion)
}
}
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone-hibernate5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ group 'examples'
apply plugin:"groovy"

dependencies {
implementation project(":grails-datastore-gorm-hibernate5")
implementation project(":grace-datastore-gorm-hibernate5")
runtimeOnly "com.h2database:h2:$h2Version"
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
runtimeOnly "org.apache.tomcat.embed:tomcat-embed-logging-log4j:8.5.2"
runtimeOnly "org.slf4j:slf4j-api:$slf4jVersion"
implementation "org.grails:grails-core:$grailsVersion"
implementation "org.graceframework:grace-core:$graceVersion"
testImplementation "org.spockframework:spock-core:$spockVersion"

testRuntimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ springDependencyManagementPluginVersion=1.0.15.RELEASE
tomcatVersion=9.0.73

# Following are used only for example projects
assetPipelineVersion=3.4.7
assetPipelineVersion=5.1.2
chromeDriverVersion=2.44
fieldsVersion=5.1.2
gebVersion=3.0
gebVersion=5.1.2
geckodriverVersion=0.23.0
graceViewsVersion=5.1.2
micrometer.version=1.8.0
scaffoldingVersion=5.1.2
webdriverBinariesVersion=1.4
Expand Down

0 comments on commit a56a6a8

Please sign in to comment.