Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sbearcsiro committed May 19, 2022
2 parents 67c2efc + ebe97b6 commit 57c4dc2
Show file tree
Hide file tree
Showing 20 changed files with 287 additions and 202 deletions.
20 changes: 10 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
target
out
*.iml
.idea
plugin.xml
*.tld
*.zip
*.sha1
Thumbs.db
.DS_Store

.gradle/
.gradle
build/
out/
.idea
*.iml
*.ipr
*.iws
.project
.settings
.classpath
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
language: groovy
jdk:
- openjdk8
- openjdk11
sudo: false
branches:
only:
- master
- hotfix
- 2016design
- grails3
- grails4
- pivotal
- develop
- /^feature.*$/
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand All @@ -23,5 +25,6 @@ after_success:

env:
global:
- JAVA_TOOL_OPTIONS=-Dhttps.protocols=TLSv1.2
- secure: Z5AvuNqq+rShuYsJ8JrkXUBHrM/VyAnSbAe6OOMf/Um+u9LGoIb8YFMj4IYWQHf7c4k7MiW2gA46DgGe5I4SHLigxEcg9RC6oZBmw9C2Yl39JuhLxkuG9BNQWSvdoD5yh6Ce16artZOxUpaE3A86/oWBViLjBohXVZXqjhozFj0=
- secure: GttlChheLdvfF+v195ve77TvWp+TOpDfM/gN3pw+JKhmnICu9j6qPCV1UhmjSxX5dDcS3cno75aTik1oJSwa7zIJwrKG00eWB6sNwJv6XjJShnMx/CcXpGPHGYb/dubGD5a5Fp08SC8AyQ5175rPE6zgruTXrifxWMAgk430DUE=
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ala-bootstrap3 [![Build Status](https://travis-ci.org/AtlasOfLivingAustralia/ala-bootstrap3.svg?branch=master)](https://travis-ci.org/AtlasOfLivingAustralia/ala-bootstrap3)
=========
## Grails 4
The version of 4.0.0-SNAPSHOT with Grails 4.0.13 can be found on the `grails4` branch of this repo.

## Grails 3

The Grails 3 version of this plugin can be found on the `master` branch of this repo.
Expand All @@ -10,15 +13,23 @@ The Grails 2 version of this plugin can be found on the `grails2` branch of this

## Usage
```
compile ":ala-bootstrap3:3.0.6"
compile ":ala-bootstrap3:4.0.0-SNAPSHOT"
```

## Description
This is a Grails Plugin to provide the basic set of web assets to correctly apply the **new 2017** ala web theme based on [bootstrap 3.3.4](http://getbootstrap.com)

Many of its features come inherited from the [ala-boostrap2 plugin](https://github.com/AtlasOfLivingAustralia/ala-bootstrap2).

Note: templates, some CSS & JS files are located in the `commonui-bs3` directory. If these have been changed, then the production version will require updating - talk to the sys admin who will update them via Git.
Note: templates, some CSS & JS files are located in the `commonui-bs3` git repository.

## Integration with ALA-Auth plugin

This plugin assumes but does not directly depend on the ala-auth plugin. It switches login URL behaviour based on the `security.oidc.enabled` config property, using the ala-auth provided login controller instead of a redirect straight to the configured CAS server.

### Use without the ALA-Auth plugin

To use custom login behaviour with this plugin without the ALA-Auth plugin, set `security.oidc.enabled` to true then define a URL mapping named 'login', which can accept a single parameter `url` which is the URL to redirect to after logging in.

## Grails taglib integration with Bootstrap
This plugin borrows the taglib used in the [Grails Twitter Bootstrap plugin](https://grails.org/plugin/twitter-bootstrap) to modify the way some Core Grails tags are rendered (eg: pagination)
Expand All @@ -30,6 +41,9 @@ grails.plugins.twitterbootstrap.fixtaglib = true
```

## Changelog
* Version **4.0.0** (??)
* Grails 4 support
* Defaults to skin v2
* Version **3.0.0** (19/07/2017)
* Grails 3 support
* Version **2.0.0** (17/07/2017)
Expand Down
113 changes: 68 additions & 45 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,84 +1,109 @@
import org.gradle.api.publish.maven.MavenPublication

buildscript {
repositories {
mavenLocal()
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://nexus.ala.org.au/content/groups/public/" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.14.2"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.10"
}
}

version "3.2.4"
version "4.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"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"
apply plugin:"maven-publish"

repositories {
mavenLocal()
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://nexus.ala.org.au/content/groups/public/" }
}

configurations {
provided
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

dependencies {
// compile "org.springframework.boot:spring-boot-starter-logging"
// compile "org.springframework.boot:spring-boot-autoconfigure"
developmentOnly("org.springframework.boot:spring-boot-devtools")
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-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
// compile "org.grails:grails-web-boot"
// compile "org.grails.plugins:cache"
// compile "org.grails.plugins:scaffolding"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:gsp"
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web-plugin"
// provided "org.grails:grails-plugin-services"
// provided "org.grails:grails-plugin-domain-class"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.2"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
testCompile "io.micronaut:micronaut-inject-groovy"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"

testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
// TODO Remove this dependency?
compile 'au.org.ala:ala-cas-client:2.5'

}

bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
addResources = true
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
// enable if you wish to package this plugin as a standalone application
bootRepackage.enabled = false
grailsPublish {

grailsPublish {
// user = 'user'
// key = 'key'
// userOrg = 'my-company' // optional, otherwise published to personal bintray account
// repo = 'plugins' // optional, defaults to 'plugins'

websiteUrl = 'http://github.com/AtlasOfLivingAustralia/ala-bootstrap3'
license {
name = 'MPL-2.0'
}
issueTrackerUrl = 'http://github.com/AtlasOfLivingAustralia/ala-bootstrap3/issues'
vcsUrl = 'http://github.com/AtlasOfLivingAustralia/ala-bootstrap3'
title = "ALA Bootstrap3 Plugin"
desc = "Plugin for adding ALA bootstrap 3 styles"
developers = [:]
bootJar.enabled = false

test {
testLogging {
events "failed"
exceptionFormat "full"
}
}

assets {
packagePlugin = true
}

publishing {
repositories {
maven {
Expand Down Expand Up @@ -106,11 +131,9 @@ publishing {
}
}
from components.java
artifact sourcesJar
artifact javadocJar

}
}
}

assets {
packagePlugin = true
}
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Thu Jun 20 17:08:52 AEST 2019
grailsVersion=3.2.11
grailsWrapperVersion=1.0.0
gormVersion=6.0.12.RELEASE
gradleWrapperVersion=3.4.1
grailsVersion=4.0.13
gorm.version=7.0.8.RELEASE
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
72 changes: 42 additions & 30 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand All @@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,26 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -85,7 +89,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand Down Expand Up @@ -150,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
Loading

0 comments on commit 57c4dc2

Please sign in to comment.