Skip to content

Commit

Permalink
Merge pull request #2 from jdaugherty/6.0.x
Browse files Browse the repository at this point in the history
Move to a strategy of targeting a grails version by branch version
  • Loading branch information
codeconsole authored Oct 15, 2024
2 parents fe1b4a2 + 42b19d5 commit 13b49bd
Show file tree
Hide file tree
Showing 560 changed files with 136 additions and 90,711 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/gradle-publish.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Java CI
on:
push:
branches:
- '[6-9]+.[0-9]+.x'
pull_request:
branches:
- '[6-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
SIGNING_KEYRING: ${{ secrets.SECRING_FILE }}
steps:
- uses: actions/checkout@v4
- name: Setup up node
uses: actions/setup-node@v3
with:
node-version: '20.5.1'
- run: npm install
- run: npx gulp grailsRelease
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Run build with Gradle Wrapper
run: ./gradlew build -Dgeb.env=chromeHeadless
working-directory: plugin
publish:
if: github.event_name == 'push'
needs: ['build']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup up node
uses: actions/setup-node@v3
with:
node-version: '20.5.1'
- run: npm install
- run: npx gulp grailsRelease
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Publish Artifacts (repo.grails.org)
id: publish
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
working-directory: plugin
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
*.iml
build
node_modules
.grunt
.grunt
.gradle
build
classes
out
1 change: 1 addition & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java=11.0.24-librca
146 changes: 17 additions & 129 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,129 +1,18 @@
## Summary
A web-based Groovy console for interactive runtime application management and debugging

![Screenshot](https://raw.github.com/sheehan/grails-console/images/screenshot.png)
![Screenshot](https://raw.github.com/gpc/grails-web-console/images/screenshot.png)

## Installation

The [1.X](https://grails.org/plugin/console) version is for Grails 2.

The [2.0.X](http://plugins.grails.org/plugin/sheehan/console) version is for Grails 3.0 - 3.2.

The [2.X.X](http://plugins.grails.org/plugin/sheehan/console) version is for Grails 3.3+.

The [4.X.X](http://plugins.grails.org/plugin/sheehan/console) version is for Grails 4+.

The [5.X.X](http://plugins.grails.org/plugin/sheehan/console) version is for Grails 5+.

### Grails 2

Add a dependency in BuildConfig.groovy:

```groovy
grails.project.dependency.resolution = {
// ...
plugins {
runtime ':console:1.5.12'
// ...
}
}
```

### Grails 3+

**Note:** If using Grails 3.0.4, you need to update the asset-pipeline dependency in build.gradle to 3.0.6 or greater. 3.0.5 is used by default and has a bug that prevents the console page from rendering.

**Note:** If using Grails 3.0.12, you will need to add this to your configuration: `grails.resources.pattern = '/**'`. There is a [bug](https://github.com/grails/grails-core/issues/9584) related to resource paths.

Add a dependency in build.gradle

```groovy
runtime 'org.grails.plugins:grails-console:2.1.1'
```

For upgraded handler version use below version.

```groovy
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.vsachinv:grails-console:2.2.0'
}
```


### Grails 4+
## Versions

Add a dependency in build.gradle
- `1.X` for Grails 2
- `2.0.X` for Grails 3.0 - 3.2
- `2.2.X` for Grails 3.3+
- `4.X.X` for Grails 4+
- `5.X.X` for Grails 5+
- `6.X.X` for Grails 6+

```groovy
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.vsachinv:grails-console:4.0-M1'
}
```

In addition if you don't want to use jitpack.io then use following github package registry:

```groovy
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/vsachinv/grails-console")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
compile 'org.grails.plugins:grails-console:4.0-M1'
}
```

### Grails 5+

Add a dependency in build.gradle

```groovy
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.vsachinv:grails-console:5.0-M1'
}
```

In addition if you don't want to use jitpack.io then use following github package registry:

```groovy
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/vsachinv/grails-console")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
compile 'org.grails.plugins:grails-console:5.0-M1'
}
```


### Grails 6+
## Installation

Add a dependency in build.gradle

Expand All @@ -133,7 +22,7 @@ repositories {
}
dependencies {
compile 'com.github.vsachinv:grails-console:6.0-M2'
compile 'com.github.gpc:grails-web-console:6.0-M2'
}
```

Expand All @@ -143,7 +32,7 @@ In addition if you don't want to use jitpack.io then use following github packag
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/vsachinv/grails-console")
url = uri("https://maven.pkg.github.com/gpc/grails-web-console")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
Expand All @@ -152,7 +41,7 @@ repositories {
}
dependencies {
compile 'org.grails.plugins:grails-console:6.0-M2'
compile 'org.grails.plugins:grails-web-console:6.0-M2'
}
```
Expand Down Expand Up @@ -186,7 +75,7 @@ Calls made to the implicit `console` variable will be executed on the browser's
The arguments are serialized as JSON and the calls are queued to run after the script completes.

Example:
![Screenshot](https://raw.github.com/sheehan/grails-console/images/screenshot2.png)
![Screenshot](https://raw.github.com/gpc/grails-web-console/images/screenshot2.png)

## Implicit variables

Expand All @@ -199,7 +88,7 @@ The following implicit variables are available:
* `session` - the current [HTTP session](http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSession.html)
* `out` - the output [PrintStream](http://docs.oracle.com/javase/7/docs/api/java/io/PrintStream.html)

See [Script Examples](https://github.com/sheehan/grails-console/wiki/Script-Examples) for example usage.
See [Script Examples](https://github.com/gpc/grails-web-console/wiki/Script-Examples) for example usage.

## Keyboard Shortcuts

Expand Down Expand Up @@ -236,8 +125,7 @@ Spring Security Core example:
```groovy
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
[pattern:"/console/**", access:['ROLE_ADMIN']],
[pattern:"/plugins/console*/**", access:['ROLE_ADMIN']], // Grails 2.x
[pattern:"/static/console/**", access:['ROLE_ADMIN']], // Grails 3+
[pattern:"/static/console/**", access:['ROLE_ADMIN']],
]
```

Expand All @@ -246,8 +134,7 @@ Another example restricting access to localhost IPs:
```groovy
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
[pattern:"/console/**", access:["hasRole('ROLE_ADMIN') && (hasIpAddress('127.0.0.1') || hasIpAddress('::1'))"]],
[pattern:"/plugins/console*/**", access:["hasRole('ROLE_ADMIN') && (hasIpAddress('127.0.0.1') || hasIpAddress('::1'))"]], // Grails 2.x
[pattern:"/static/console/**", access:["hasRole('ROLE_ADMIN') && (hasIpAddress('127.0.0.1') || hasIpAddress('::1'))"]], // Grails 3+
[pattern:"/static/console/**", access:["hasRole('ROLE_ADMIN') && (hasIpAddress('127.0.0.1') || hasIpAddress('::1'))"]],
]
```

Expand All @@ -258,6 +145,7 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
* [Matt Sheehan](https://github.com/sheehan)
* [Mike Hugo](https://github.com/mjhugo)
* [Kamil Dybicz](https://github.com/kdybicz)
* [Sachin Verma](https://github.com/vsachinv)

## Development

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions grails6/app/build.gradle → app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id "eclipse"
}

group = "grails6.app"
group = "grails.app"

repositories {
mavenLocal()
Expand Down Expand Up @@ -71,7 +71,7 @@ dependencies {
}

application {
mainClass.set("grails6.app.Application")
mainClass.set("grails.app.Application")
}

java {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package grails6.app
package grails.app

class Foo {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package grails6.app
package grails.app

import grails.boot.GrailsApp
import grails.boot.config.GrailsAutoConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package grails5.app
package grails.app

class BootStrap {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion grails6/app/grails-cli.yml → app/grails-cli.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
applicationType: web
defaultPackage: grails6sample
defaultPackage: grailssample
testFramework: spock
sourceLanguage: groovy
buildTool: gradle
Expand Down
Loading

0 comments on commit 13b49bd

Please sign in to comment.