Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c6d9669
Upgrade to NPM and fix test cases for Grails 3.x with handlebar upgra…
vsachinv May 8, 2024
8a3a477
Add source code of plugin for upgrade to Grails 4.
vsachinv May 8, 2024
86f6615
upgrade plugin sample app artifacts.
vsachinv May 8, 2024
2dacf59
Update READ.me file and add github action for package publish on vers…
vsachinv May 8, 2024
0390729
Fix github action yaml file.
vsachinv May 8, 2024
784d7b3
Fix github action yaml file for working-directory
vsachinv May 8, 2024
828257d
Upgrade node version for github actions
vsachinv May 8, 2024
722717d
Update node version in github actions.
vsachinv May 8, 2024
3f5bff9
Fix Phantomjs lib dependency
vsachinv May 13, 2024
4a0c4d1
Fix NPM dependencies
vsachinv May 13, 2024
db75ada
Adde gulp install command
vsachinv May 13, 2024
317ee25
Correct github credentials property names.
vsachinv May 13, 2024
e7f69b9
Merge branch '3.x-upgrade' into 4.x-upgrade
vsachinv May 13, 2024
2fa96da
Correct github action for grails 4 publish.
vsachinv May 13, 2024
f4094f2
Update README.md file for Grails 4 dependency.
vsachinv May 13, 2024
21f4265
Correct build for git properties and task.
vsachinv May 13, 2024
503e4ff
Corrected github repo url
vsachinv May 13, 2024
55c902f
Upgrade plugin to grails 5.6.2
vsachinv May 14, 2024
088dc2e
Upgrade app to Grails 5.6.2 and also fix build.gradle for Grails 5.6.2
vsachinv May 14, 2024
4866816
Upgrade app to Grails 6.2 and also fix build.gradle for Grails 6.2
vsachinv May 15, 2024
1449b80
Fix build.gradle for multi project Grails 6.2
vsachinv May 15, 2024
18307eb
Upgrade commons dependency version
vsachinv May 15, 2024
4290890
Fix github action jdk version usage
vsachinv May 15, 2024
167f3a8
Fix test cases run dependency and navigable map warning for accessing…
vsachinv Jun 30, 2024
e893a96
Update README.md for Grails 6.x dependency.
vsachinv Jun 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Setup up node
uses: actions/setup-node@v3
with:
node-version: '20.5.1'
- run: npm install
- run: npm install --global gulp-cli
- run: npm gulp grails5Release
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
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
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle Wrapper
run: ./gradlew build
working-directory: grails6/plugin
- name: Publish to GitHub Packages
run: ./gradlew publishMavenJarPublicationToGitHubPackagesRepository
working-directory: grails6/plugin
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This plugin uses [Gulp](http://gulpjs.com/) to build its resources.

1. Change to the project's root directory.
1. Install project dependencies with `npm install`.
1. Build the resources with `gulp release-all`.
1. Build the resources with `npm run release-all`.

## Gulp tasks
## NPM tasks

| Task | Description |
| --- | --- |
Expand Down
38 changes: 38 additions & 0 deletions LOCALDEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Local Deployment

This page is meant for people not willing to wait for an official plugin release.

### Build

```shell
npm run grails3:release

cd grails3/plugin

./gradlew clean
./gradlew build
```

### Public local

Steps to use new version locally:
* Add mavenLocal() as a repository location in the main build.gradle
* Make sure mavenLocal() is in the first position of the list.
* Make sure you are using the correct version of your library.

```
buildscript {
repositories {
mavenLocal()
...
```

Now, every time you change a line in the Library you need to execute within library project path, the following gradle command:

```shell
./gradlew build publishToMavenLocal
```

### Publish to S3

You can follow one of the guides on how to deploy to S3 bucket you can find in [Google](https://www.google.com/search?q=maven+publish+to+s3).
131 changes: 128 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ 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.1.X](http://plugins.grails.org/plugin/sheehan/console) version is for Grails 3.3+.
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

Expand Down Expand Up @@ -37,6 +41,122 @@ Add a dependency in build.gradle
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+

Add a dependency in build.gradle

```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+

Add a dependency in build.gradle

```groovy
repositories {
maven { url "https://jitpack.io" }
}

dependencies {
compile 'com.github.vsachinv:grails-console:6.0-M2'
}
```

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:6.0-M2'
}

```

## Usage

Use a browser to navigate to the /console page of your running app, e.g. http://localhost:8080/{app-name}/console
Expand Down Expand Up @@ -117,7 +237,7 @@ Spring Security Core example:
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.x
[pattern:"/static/console/**", access:['ROLE_ADMIN']], // Grails 3+
]
```

Expand All @@ -127,7 +247,7 @@ Another example restricting access to localhost IPs:
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.x
[pattern:"/static/console/**", access:["hasRole('ROLE_ADMIN') && (hasIpAddress('127.0.0.1') || hasIpAddress('::1'))"]], // Grails 3+
]
```

Expand All @@ -137,7 +257,12 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
* [Burt Beckwith](https://github.com/burtbeckwith)
* [Matt Sheehan](https://github.com/sheehan)
* [Mike Hugo](https://github.com/mjhugo)
* [Kamil Dybicz](https://github.com/kdybicz)

## Development

Please see [CONTRIBUTING.md](CONTRIBUTING.md)

## Local deployment

Please see [LOCALDEPLOYMENT.md](LOCALDEPLOYMENT.md)
47 changes: 47 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
npm install

# for Grails 3

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
./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
18 changes: 18 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
### v6.0-M1
* Upgrade to Grails 6.2

### v5.0-M1
* Upgrade to Grails 5.3.6

### v4.0-M1
* Upgrade for Grails 4.1.4

### v2.2.0
* Fix for Console hijacking `System.out` and breaking system logs
* Fix for `NullPointerException` when running empty script on server with `grails.databinding.convertEmptyStringsToNull` set to default value `true`
* Fix for `grails3/plugin` structure and code refactoring to match Grails v3.3+ recommendations
* Updated Handlebar Runtime to 4.7.6
* Updating most of Node project dev-dependencies
* Updating structure and format of `gulpfile.js` to match Gulp v4 recommendations
* Build with Java 8

### v2.1.1
* Fix #65 build with Java 7

Expand Down
4 changes: 3 additions & 1 deletion grails3/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.gradle
build
classes
classes

out
Loading