From e13b161b5735e285904b809eab55d1a78fa99c3b Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Mon, 23 Dec 2024 17:10:45 -0500 Subject: [PATCH] Clean-up for grails M1 release --- build.gradle | 37 ++++++++----------- buildSrc/build.gradle | 11 ++---- examples/redis-demo/build.gradle | 63 ++++++++++++-------------------- examples/redis-demo/test-apps | 10 ----- gradle.properties | 19 +++------- plugin/build.gradle | 38 ++++++------------- settings.gradle | 11 ++---- 7 files changed, 64 insertions(+), 125 deletions(-) delete mode 100755 examples/redis-demo/test-apps diff --git a/build.gradle b/build.gradle index 80e70cf..6249336 100644 --- a/build.gradle +++ b/build.gradle @@ -1,22 +1,17 @@ -plugins { - id "java-library" - id "org.grails.grails-gsp" - id "org.grails.grails-plugin" -} - -version = project.projectVersion -group = 'org.grails.plugins' - -allprojects { - - repositories { - mavenCentral() - maven { url "https://repo.grails.org/grails/core" } - } - - tasks.withType(GroovyCompile) { - configure(groovyOptions) { - forkOptions.jvmArgs = ['-Xmx1024m'] - } - } +plugins { + id 'io.github.gradle-nexus.publish-plugin' +} + +allprojects { + + repositories { + mavenCentral() + maven { url "https://repo.grails.org/grails/core" } + } + + tasks.withType(GroovyCompile) { + configure(groovyOptions) { + forkOptions.jvmArgs = ['-Xmx1024m'] + } + } } \ No newline at end of file diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 672c1a8..621d873 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -3,13 +3,10 @@ apply from: "./loadProps.gradle" repositories { mavenCentral() maven { url "https://repo.grails.org/grails/core" } - maven { - url = 'https://repo.gradle.org/gradle/libs-releases' - description = 'Needed for Gradle Tooling API' - } } + dependencies { - implementation "com.bertramlabs.plugins:asset-pipeline-gradle:${assetPipelineGrailVersion}" - implementation "org.grails:grails-gradle-plugin:${grailsVersion}" - implementation "org.gradle:gradle-tooling-api:${gradleToolingApiVersion}" + implementation "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion" + implementation "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineGradleVersion" + implementation "io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin:2.0.0" } \ No newline at end of file diff --git a/examples/redis-demo/build.gradle b/examples/redis-demo/build.gradle index 415ea08..087c256 100644 --- a/examples/redis-demo/build.gradle +++ b/examples/redis-demo/build.gradle @@ -1,12 +1,11 @@ plugins { + id "groovy" id "war" - id 'eclipse' - id 'idea' - id "org.grails.grails-web" + id "idea" id "com.bertramlabs.asset-pipeline" + id "org.grails.grails-web" id "org.grails.grails-gsp" - id "application" } version = project.projectVersion @@ -16,55 +15,41 @@ assets { minifyCss = true } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } -} - -repositories { - mavenCentral() - maven { url "https://repo.grails.org/grails/core" } -} +compileJava.options.release = 17 dependencies { - implementation "org.springframework.boot:spring-boot-starter-logging" - implementation "org.springframework.boot:spring-boot-autoconfigure" - implementation "org.springframework.boot:spring-boot-starter-actuator" - implementation "org.springframework.boot:spring-boot-starter-tomcat" + implementation platform("org.grails:grails-bom:$grailsVersion") + profile "org.grails.profiles:web" implementation "org.grails:grails-core" - - implementation "org.grails:grails-web-boot" implementation "org.grails:grails-logging" - implementation "org.grails:grails-plugin-rest" 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-plugin-interceptors" - - implementation "org.grails.plugins:cache:$cacheVersion" - implementation "org.grails.plugins:async:$asyncVersion" - implementation "org.grails.plugins:hibernate5:$gormVersion" - implementation "org.hibernate:hibernate-core-jakarta:$hibernate5Version" - implementation project(':grails-redis') + implementation "org.grails:grails-web-boot" implementation "org.grails.plugins:gsp" + implementation "org.grails.plugins:hibernate5" + implementation "org.grails.plugins:scaffolding" + implementation "org.springframework.boot:spring-boot-autoconfigure" + implementation "org.springframework.boot:spring-boot-starter" + implementation "org.springframework.boot:spring-boot-starter-actuator" + implementation "org.springframework.boot:spring-boot-starter-logging" + implementation "org.springframework.boot:spring-boot-starter-tomcat" + implementation "org.springframework.boot:spring-boot-starter-validation" console "org.grails:grails-console" - profile "org.grails.profiles:web" - - runtimeOnly "org.glassfish.expressly:expressly:$expresslyVersion" - runtimeOnly "com.h2database:h2:$h2Version" + runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails" + runtimeOnly "com.h2database:h2" runtimeOnly "org.apache.tomcat:tomcat-jdbc" - runtimeOnly "jakarta.xml.bind:jakarta.xml.bind-api:$xmlBindApiVersion" - runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineGrailVersion" - + runtimeOnly "org.fusesource.jansi:jansi" testImplementation "org.grails:grails-gorm-testing-support" - testImplementation "org.mockito:mockito-core" testImplementation "org.grails:grails-web-testing-support" -} + testImplementation "org.spockframework:spock-core" -application { - mainClass.set("com.example.Application") + implementation "org.grails.plugins:cache" + implementation "org.grails.plugins:async" + implementation project(':grails-redis') } assets { diff --git a/examples/redis-demo/test-apps b/examples/redis-demo/test-apps deleted file mode 100755 index abeac75..0000000 --- a/examples/redis-demo/test-apps +++ /dev/null @@ -1,10 +0,0 @@ -#/usr/bin/bash - -clear -rm -rf ~/.m2/repository/org/grails/plugins/redis -cd ../../../../ -pwd -./gradlew install -cd src/test/projects/sample -pwd -./gradlew test-app diff --git a/gradle.properties b/gradle.properties index 56ea549..a01244a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,22 +1,15 @@ projectVersion=5.0.0-SNAPSHOT -assetPipelineGrailVersion=5.0.1 -asyncVersion=6.0.0-SNAPSHOT -cacheVersion=8.0.0-SNAPSHOT +# Grails +grailsVersion=7.0.0-M1 +grailsGradlePluginVersion=7.0.0-M3 +assetPipelineGradleVersion=5.0.5 + +# Project specific commonsPool2Version=2.12.0 -expresslyVersion=5.0.0 -gradleToolingApiVersion=8.10.2 -grailsGradlePluginVersion=7.0.0-SNAPSHOT -grailsVersion=7.0.0-SNAPSHOT gormVersion=9.0.0-SNAPSHOT -groovyVersion=4.0.23 gsonVersion=2.11.0 -h2Version=2.3.232 -hibernate5Version=5.6.15.Final -javaParserCoreVersion=3.26.2 jredisVersion=5.2.0 -scaffoldingVersion=6.0.0-SNAPSHOT -xmlBindApiVersion=4.0.2 org.gradle.caching=true org.gradle.daemon=true diff --git a/plugin/build.gradle b/plugin/build.gradle index 7ec9a4f..967a622 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -1,27 +1,16 @@ plugins { - id "java-library" - id "eclipse" - id "idea" - id "org.grails.grails-plugin" + id 'java-library' + id 'eclipse' + id 'idea' + id 'org.grails.grails-plugin' + id "org.grails.grails-gsp" + id 'org.grails.grails-publish' } version = project.projectVersion -group = "org.grails.plugins" +group = 'org.grails.plugins' -apply plugin: 'org.grails.grails-publish' - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } -} - -dependencyManagement { - imports { - mavenBom "org.grails:grails-bom:$grailsVersion" - } - applyMavenExclusions false -} +compileJava.options.release = 17 configurations { documentation.extendsFrom compileClasspath @@ -32,13 +21,8 @@ configurations { } } -repositories { - mavenCentral() - maven { url "https://repo.grails.org/grails/core" } -} - dependencies { - implementation 'org.springframework.boot:spring-boot-starter-logging' + implementation "org.springframework.boot:spring-boot-starter-logging" implementation "org.springframework.boot:spring-boot-starter-actuator" implementation "org.springframework.boot:spring-boot-autoconfigure" implementation "org.springframework.boot:spring-boot-starter-tomcat" @@ -52,7 +36,7 @@ dependencies { api "redis.clients:jedis:$jredisVersion" api "com.google.code.gson:gson:$gsonVersion" - documentation("com.github.javaparser:javaparser-core:$javaParserCoreVersion") { + documentation("com.github.javaparser:javaparser-core") { transitive = false } } @@ -82,4 +66,4 @@ grailsPublish { 'davidseiler': 'David Seiler', 'jordonsaardchit': 'Jordon Saardchit', 'florianlangenhahn': 'Florian Langenhahn', 'germansancho': 'German Sancho', 'johnmulhern': 'John Mulhern', 'shaunjurgemeyer': 'Shaun Jurgemeyer', 'puneetbehl': 'Puneet Behl'] -} \ No newline at end of file +} diff --git a/settings.gradle b/settings.gradle index 346d936..e717831 100644 --- a/settings.gradle +++ b/settings.gradle @@ -29,15 +29,10 @@ buildCache { } } -rootProject.name = "grails-redis" +rootProject.name = "grails-redis-root" -include "examples-redis-demo" include 'plugin' - -project(":examples-redis-demo").projectDir = [settingsDir, 'examples/redis-demo'] as File - - findProject(':plugin').name = 'grails-redis' - - +include "examples-redis-demo" +project(":examples-redis-demo").projectDir = [settingsDir, 'examples/redis-demo'] as File