Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Java CI
on:
push:
branches:
- 2.0.x
- '[1-9]+.[0-9]+.x'
- master
pull_request:
branches:
- 2.0.x
- '[1-9]+.[0-9]+.x'
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
java: ['11']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
Expand All @@ -30,10 +30,10 @@ jobs:
with:
java-version: ${{ matrix.java }}
- name: Run Assemble
if: success() && github.event_name == 'push' && matrix.java == '8'
if: success() && github.event_name == 'push' && matrix.java == '11'
run: ./gradlew assemble
- name: Publish to repo.grails.org
if: success() && github.event_name == 'push' && matrix.java == '8'
if: success() && github.event_name == 'push' && matrix.java == '11'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches:
- master
- 2.0.x
- '[1-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
release_notes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
java: ['11']
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: behlp@objectcomputing.com
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cache:
directories:
- $HOME/.gradle
jdk:
- openjdk8
- openjdk11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think Travis is used anymore. We can delete this file.

script: ./travis-build.sh
env:
global:
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
projectVersion=3.1.0-SNAPSHOT
projectVersion=4.0.0-SNAPSHOT
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include 'starter'
include 'wrapper'

project(":wrapper").name = "grails5_3_4-wrapper"
project(":wrapper").name = "grails6-wrapper"
4 changes: 2 additions & 2 deletions starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ jar {
}
}

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
2 changes: 1 addition & 1 deletion starter/src/main/java/grails/init/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

public class Start {

private static final String PROJECT_NAME = "grails5_3_4-wrapper";
private static final String PROJECT_NAME = "grails6-wrapper";
private static final String WRAPPER_PATH = "/org/grails/" + PROJECT_NAME;
private static final String DEFAULT_GRAILS_CORE_ARTIFACTORY_BASE_URL = "https://repo.grails.org/grails/core";
private static final File WRAPPER_DIR = new File(System.getProperty("user.home") + "/.grails/wrapper");
Expand Down
21 changes: 15 additions & 6 deletions wrapper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ buildscript {
}
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVerison"
classpath 'io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE'
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath 'io.spring.gradle:dependency-management-plugin:1.1.6'
classpath "io.github.gradle-nexus:publish-plugin:2.0.0"
classpath "com.bmuschko:gradle-nexus-plugin:2.3.1"
}
}
Expand All @@ -25,7 +25,7 @@ group 'org.grails'
version project.projectVersion

ext.pomInfo = {
delegate.name 'Grails 5 Wrapper'
delegate.name 'Grails 6 Wrapper'
delegate.description 'The Grails Wrapper Project'
delegate.url 'https://github.com/grails/grails-wrapper'

Expand Down Expand Up @@ -74,10 +74,17 @@ ext {

configurations {
groovyDoc.extendsFrom runtimeClasspath

all {
resolutionStrategy.dependencySubstitution {
//update fields plugin used by scaffolding
substitute(module("org.codehaus.plexus:plexus-sec-dispatcher:2.0")).with(module("org.sonatype.plexus:plexus-sec-dispatcher:1.4"))
}
}
}

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

repositories {
mavenCentral()
Expand Down Expand Up @@ -106,6 +113,8 @@ jar {
manifest {
attributes 'Main-Class': 'grails.init.RunCommand'
}

duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

task sourcesJar(type: Jar) {
Expand Down
10 changes: 5 additions & 5 deletions wrapper/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
grailsVersion=5.0.0
grailsGradlePluginVerison=5.0.0
groovyVersion=3.0.5
springBootVersion=2.5.0
micronautInjectGroovyVersion=3.8.8
grailsVersion=6.0.0
grailsGradlePluginVersion=6.0.0
groovyVersion=3.0.21
springBootVersion=2.7.12
micronautInjectGroovyVersion=3.10.4
23 changes: 19 additions & 4 deletions wrapper/src/main/groovy/grails/init/RunCommand.groovy
Original file line number Diff line number Diff line change
@@ -1,37 +1,52 @@
package grails.init

import org.springframework.boot.cli.compiler.grape.AetherGrapeEngine
import org.springframework.boot.cli.compiler.grape.AetherGrapeEngineFactory

import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext
import org.springframework.boot.cli.compiler.grape.MavenResolverGrapeEngine
import org.springframework.boot.cli.compiler.grape.MavenResolverGrapeEngineFactory
import org.springframework.boot.cli.compiler.grape.RepositoryConfiguration

/**
* Created by jameskleeh on 10/31/16.
*/
class RunCommand {

static final String DEFAULT_GRAILS_SHELL_VERSION = '6.1.2'

static void main(String[] args) {

Properties props = new Properties()
String grailsVersion
String grailsShellVersion
String groovyVersion
try {
props.load(new FileInputStream("gradle.properties"))
grailsVersion = props.getProperty("grailsVersion")
grailsShellVersion = props.getProperty("grailsShellVersion")
groovyVersion = props.getProperty("groovyVersion")
} catch (IOException e) {
throw new RuntimeException("Could not determine grails version due to missing properties file")
}

if(!grailsShellVersion) {
grailsShellVersion = DEFAULT_GRAILS_SHELL_VERSION
}

GroovyClassLoader groovyClassLoader = new GroovyClassLoader(RunCommand.classLoader)

List<RepositoryConfiguration> repositoryConfigurations = [new RepositoryConfiguration("grailsCentral", new URI("https://repo.grails.org/grails/core"), true)]
if (groovyVersion && groovyVersion.endsWith("SNAPSHOT")) {
repositoryConfigurations.add(new RepositoryConfiguration("JFrog OSS snapshot repo", new URI("https://oss.jfrog.org/oss-snapshot-local"), true))
}

AetherGrapeEngine grapeEngine = AetherGrapeEngineFactory.create(groovyClassLoader, repositoryConfigurations, new DependencyResolutionContext(), false)
grapeEngine.grab([:], [group: "org.grails", module: "grails-shell", version: grailsVersion])
MavenResolverGrapeEngine grapeEngine = MavenResolverGrapeEngineFactory.create(groovyClassLoader, repositoryConfigurations, new DependencyResolutionContext(), false)
try {
grapeEngine.grab([:], [group: "org.grails", module: "grails-shell", version: grailsVersion])
}
catch(dependencyResolutionException){
// Try grails shell version from gradle.properties or default
grapeEngine.grab([:], [group: "org.grails", module: "grails-shell", version: grailsShellVersion])
}

ClassLoader previousClassLoader = Thread.currentThread().contextClassLoader
Thread.currentThread().setContextClassLoader(groovyClassLoader)
Expand Down