Skip to content

Commit

Permalink
Merge pull request #1 from gpc/grails6
Browse files Browse the repository at this point in the history
Upgraded to Grails 6.x
  • Loading branch information
sbglasius authored Oct 16, 2024
2 parents 8bfbd1a + 3227d62 commit 2f0a479
Show file tree
Hide file tree
Showing 14 changed files with 428 additions and 247 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Check and publish snapshot

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build and publish snapshot
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
run: ./gradlew publish
3 changes: 3 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=11.0.24-tem
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ The guava cache provides a simple in memory cache with maximal capacity and TTL.

```groovy
dependencies {
compile 'org.grails.plugins:cache:4.0.0'
compile 'org.grails.plugins:cache-guava:1.0.0'
implementation 'org.grails.plugins:cache'
implementation 'io.github.gpc:cache-guava:2.0.0-SNAPSHOT'
}
```

Expand All @@ -38,7 +38,7 @@ grails:
The GrailsGuavaCacheManager is automatically configured by the plugin.
### Annoations and Services
### Annotations and Services
Just use grails-cache's annotations and services as described in
its [documentation](http://grails-plugins.github.io/grails-cache/snapshot/guide/index.html)
107 changes: 57 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,67 +1,74 @@
buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
}
plugins {
id "groovy"
id "org.grails.grails-web"
id "org.grails.grails-gsp"
id "org.grails.grails-plugin" version '6.2.1'
id "application"
}

version "1.0.0"
group "org.grails.plugins"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"
apply plugin:"org.grails.grails-gsp"
group "io.github.gpc"

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

dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:scaffolding"
console "org.grails:grails-console"
profile "org.grails.profiles:web-plugin"
provided "org.grails:grails-plugin-services"
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-services")
implementation("org.grails:grails-plugin-url-mappings")
implementation("org.grails:grails-web-boot")
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")
testImplementation("org.spockframework:spock-core")
testImplementation("io.micronaut:micronaut-inject-groovy")
testImplementation("org.grails:grails-web-testing-support")
testImplementation("org.grails.plugins:geb")
testImplementation platform("org.seleniumhq.selenium:selenium-bom:${seleniumVersion}")
testImplementation("org.seleniumhq.selenium:selenium-api")
testImplementation("org.seleniumhq.selenium:selenium-remote-driver")
testImplementation("org.seleniumhq.selenium:selenium-support")
testImplementation("org.seleniumhq.selenium:selenium-http")
testImplementation("org.seleniumhq.selenium:selenium-chrome-driver")
testImplementation "org.testcontainers:spock:1.20.2"
testImplementation "org.testcontainers:selenium:1.20.2"

testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
implementation "org.grails.plugins:cache"

compile "org.grails.plugins:cache:4.0.0"
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation 'com.google.guava:guava:33.3.1-jre'
}

compile "com.google.guava:guava:30.1.1-jre"
application {
mainClass.set("grails.cache.guava.Application")
}

bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
addResources = true
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
java {
sourceCompatibility = JavaVersion.toVersion("11")
}
// enable if you wish to package this plugin as a standalone application
bootRepackage.enabled = false
grailsPublish {

githubSlug = 'itds-ch/grails-cache-guava'
license {
name = 'Apache-2.0'
}
title = project.name
desc = "The guava cache provides a simple in memory cache with maximal capacity and TTL."
developers = [mkobel:"Moritz obel", sbglasius: 'Søren Berg Glasius']
tasks.withType(Test) {
useJUnitPlatform()
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
}

//grailsPublish {
//
// githubSlug = 'itds-ch/grails-cache-guava'
// license {
// name = 'Apache-2.0'
// }
// title = project.name
// desc = "The guava cache provides a simple in memory cache with maximal capacity and TTL."
// developers = [mkobel: "Moritz obel", sbglasius: 'Søren Berg Glasius']
//}

10 changes: 8 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
grailsVersion=3.3.12
gradleWrapperVersion=3.5
grailsVersion=6.2.1
grailsGradlePluginVersion=6.2.1
seleniumVersion=4.25.0
version=2.0.0-SNAPSHOT
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Nov 27 23:09:32 CET 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
Loading

0 comments on commit 2f0a479

Please sign in to comment.