Skip to content

Commit

Permalink
Upgrade to grails 6.2 and align package structure as per standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsachinv committed May 14, 2024
1 parent ca20bdc commit ec73433
Show file tree
Hide file tree
Showing 16 changed files with 265 additions and 443 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'zulu'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
Expand Down
133 changes: 64 additions & 69 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,67 +1,84 @@
buildscript {
repositories {
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.3.4"
classpath "com.gorylenko.gradle-git-properties:gradle-git-properties:2.3.2"
}
plugins {
id "groovy"
id "idea"
id "org.grails.grails-web"
id "org.grails.grails-gsp"
id "org.grails.grails-plugin"
id "application"
id "eclipse"
id "com.gorylenko.gradle-git-properties"
id "maven-publish"
}

version "5.0-M1"
group "org.grails.plugins"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"
apply plugin: "com.gorylenko.gradle-git-properties"
apply plugin: 'maven-publish'
group = "org.grails.plugins"

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

configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
all {
}
}

dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails.plugins:gsp"
profile "org.grails.profiles:web-plugin"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:3.3.4"
testImplementation "io.micronaut:micronaut-inject-groovy"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"

implementation("org.grails:grails-core")
implementation("org.grails:grails-logging")
implementation("org.grails:grails-plugin-databinding")
implementation("org.grails:grails-plugin-i18n")
implementation("org.grails:grails-plugin-interceptors")
implementation("org.grails:grails-plugin-rest")
implementation("org.grails:grails-plugin-services")
implementation("org.grails:grails-plugin-url-mappings")
implementation("org.grails:grails-web-boot")
implementation("org.grails.plugins:hibernate5")
implementation("org.springframework.boot:spring-boot-autoconfigure")
implementation("org.springframework.boot:spring-boot-starter-logging")
implementation("org.springframework.boot:spring-boot-starter-validation")
compileOnly("io.micronaut:micronaut-inject-groovy")
console("org.grails:grails-console")
runtimeOnly("com.h2database:h2")
runtimeOnly("org.apache.tomcat:tomcat-jdbc")
testImplementation("io.micronaut:micronaut-inject-groovy")
testImplementation("org.grails:grails-gorm-testing-support")
testImplementation("org.spockframework:spock-core")
testImplementation("io.micronaut:micronaut-http-client")

implementation("org.grails.plugins:scaffolding")
implementation "org.grails.plugins:converters:4.0.1"

}

application {
mainClass.set("grails6pluginsample.Application")
}

java {
sourceCompatibility = JavaVersion.toVersion("11")
}

bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

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


gitProperties {
keys = ['git.branch', 'git.commit.id', 'git.commit.time', 'git.commit.id.abbrev']
failOnNoGitDirectory = true
Expand Down Expand Up @@ -101,34 +118,12 @@ task packageGroovydoc(type: Jar) {
classifier = 'groovydoc'
}

bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

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

tasks.withType(Test) {
useJUnitPlatform()
}
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false

assets {
packagePlugin = true
}

publishing {

publications {
Expand Down
13 changes: 13 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo1.maven.org/maven2/" }
maven { url "https://repo.grails.org/grails/core" }
}

dependencies {
implementation("org.grails:grails-gradle-plugin:6.1.2")
implementation("org.grails.plugins:hibernate5:8.1.0")
implementation("com.bertramlabs.plugins:asset-pipeline-gradle:4.3.0")
implementation("com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.2")
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
grailsVersion=5.3.6
grailsGradlePluginVersion=5.3.1
groovyVersion=3.0.11
gorm.version=7.3.4
grailsVersion=6.2.0
grailsGradlePluginVersion=6.1.2
version=6.0-M1
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ec73433

Please sign in to comment.