Skip to content

Commit

Permalink
Move to a strategy of targeting a grails version by branch version
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Oct 15, 2024
1 parent fe1b4a2 commit dfd691c
Show file tree
Hide file tree
Showing 557 changed files with 57 additions and 90,623 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
node-version: '20.5.1'
- run: npm install
- run: npm install --global gulp-cli
- run: npm gulp grails5Release
- run: npm gulp grailsRelease
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand All @@ -39,10 +39,10 @@ jobs:
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle Wrapper
run: ./gradlew build
working-directory: grails6/plugin
working-directory: plugin
- name: Publish to GitHub Packages
run: ./gradlew publishMavenJarPublicationToGitHubPackagesRepository
working-directory: grails6/plugin
working-directory: plugin
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
144 changes: 16 additions & 128 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-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-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-console")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
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-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-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
41 changes: 2 additions & 39 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,47 +1,10 @@
npm install

# for Grails 3
npx gulp grailsRelease

npx gulp grails3Release

cd grails3/plugin
./gradlew clean
./gradlew jar

echo
realpath build/libs/grails-console-*.jar

# for Grails 4

npx gulp grails4Release

cd grails4/plugin
./gradlew clean
./gradlew jar

echo
realpath build/libs/grails-console-*.jar


# for Grails 5

npx gulp grails5Release

cd grails5/plugin
cd plugin
./gradlew clean
./gradlew jar

echo
realpath build/libs/grails-console-*.jar


# for Grails 6

npx gulp grails6Release

cd grails6/plugin
./gradlew clean
./gradlew jar

echo
realpath build/libs/grails-console-*.jar
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions grails2/app/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions grails2/app/application.properties

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file removed grails2/app/grails-app/assets/images/favicon.ico
Binary file not shown.
20 changes: 0 additions & 20 deletions grails2/app/grails-app/assets/javascripts/application.js

This file was deleted.

13 changes: 0 additions & 13 deletions grails2/app/grails-app/assets/stylesheets/application.css

This file was deleted.

Loading

0 comments on commit dfd691c

Please sign in to comment.