|
1 | 1 | buildscript {
|
2 |
| - ext { |
3 |
| - grailsVersion = project.grailsVersion |
4 |
| - } |
5 | 2 | repositories {
|
6 | 3 | mavenLocal()
|
| 4 | + maven { url "https://plugins.gradle.org/m2/" } |
7 | 5 | maven { url "https://repo.grails.org/grails/core" }
|
8 | 6 | }
|
9 | 7 | dependencies {
|
10 |
| - classpath "org.grails:grails-gradle-plugin:$grailsVersion" |
| 8 | + classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion" |
| 9 | + classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.3.4" |
11 | 10 | }
|
12 | 11 | }
|
13 | 12 |
|
14 |
| -plugins { |
15 |
| - id "io.spring.dependency-management" version "0.5.2.RELEASE" |
16 |
| - id "com.jfrog.bintray" version "1.5" |
17 |
| -} |
18 |
| - |
19 |
| -version "1.3" |
| 13 | +version projectVersion |
20 | 14 | group "org.grails.plugins"
|
21 | 15 |
|
| 16 | +apply plugin:"eclipse" |
| 17 | +apply plugin:"idea" |
| 18 | +apply plugin:"org.grails.grails-plugin" |
| 19 | +apply plugin:"asset-pipeline" |
| 20 | +apply plugin:"org.grails.grails-gsp" |
22 | 21 | apply plugin: 'maven-publish'
|
23 |
| -apply plugin: 'eclipse' |
24 |
| -apply plugin: 'idea' |
25 |
| -apply plugin: "spring-boot" |
26 |
| -apply plugin: "org.grails.grails-plugin" |
27 |
| -apply plugin: "org.grails.grails-gsp" |
28 |
| -// Used for publishing to central repository, remove if not needed |
29 |
| -apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/grailsCentralPublishing.gradle' |
30 |
| -apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle' |
31 |
| - |
32 |
| -ext { |
33 |
| - grailsVersion = project.grailsVersion |
34 |
| - gradleWrapperVersion = project.gradleWrapperVersion |
35 |
| -} |
36 |
| - |
37 |
| -bintray { |
38 |
| - pkg { |
39 |
| - userOrg = '' |
40 |
| - name = "org.grails.plugins:$project.name" |
41 |
| - issueTrackerUrl = "https://github.com/jamescookie/$project.name/issues" |
42 |
| - vcsUrl = "https://github.com/jamescookie/$project.name" |
43 |
| - version { |
44 |
| - attributes = ['grails-plugin': "jamescookie.plugins:$project.name"] |
45 |
| - name = project.version |
46 |
| - } |
47 |
| - } |
48 |
| -} |
49 |
| - |
50 |
| -sourceCompatibility = 1.7 |
51 |
| -targetCompatibility = 1.7 |
52 |
| - |
| 22 | +apply from: layout.projectDirectory.file('gradle/publishing.gradle') |
53 | 23 |
|
54 | 24 | repositories {
|
55 | 25 | mavenLocal()
|
56 | 26 | mavenCentral()
|
57 | 27 | maven { url "https://repo.grails.org/grails/core" }
|
58 | 28 | }
|
59 | 29 |
|
60 |
| -dependencyManagement { |
61 |
| - imports { |
62 |
| - mavenBom "org.grails:grails-bom:$grailsVersion" |
| 30 | +configurations { |
| 31 | + developmentOnly |
| 32 | + runtimeClasspath { |
| 33 | + extendsFrom developmentOnly |
63 | 34 | }
|
64 |
| - applyMavenExclusions false |
65 | 35 | }
|
66 | 36 |
|
67 | 37 | dependencies {
|
68 |
| - provided 'org.springframework.boot:spring-boot-starter-logging' |
69 |
| - provided "org.springframework.boot:spring-boot-starter-actuator" |
70 |
| - provided "org.springframework.boot:spring-boot-autoconfigure" |
71 |
| - provided "org.springframework.boot:spring-boot-starter-tomcat" |
| 38 | + developmentOnly("org.springframework.boot:spring-boot-devtools") |
| 39 | + compileOnly "io.micronaut:micronaut-inject-groovy" |
| 40 | + console "org.grails:grails-console" |
| 41 | + implementation "org.springframework.boot:spring-boot-starter-logging" |
| 42 | + implementation "org.springframework.boot:spring-boot-starter-validation" |
| 43 | + implementation "org.springframework.boot:spring-boot-autoconfigure" |
| 44 | + implementation "org.grails:grails-core" |
| 45 | + implementation "org.springframework.boot:spring-boot-starter-actuator" |
| 46 | + implementation "org.springframework.boot:spring-boot-starter-tomcat" |
| 47 | + implementation "org.grails:grails-web-boot" |
| 48 | + implementation "org.grails:grails-logging" |
| 49 | + implementation "org.grails:grails-plugin-rest" |
| 50 | + implementation "org.grails:grails-plugin-databinding" |
| 51 | + implementation "org.grails:grails-plugin-i18n" |
| 52 | + implementation "org.grails:grails-plugin-services" |
| 53 | + implementation "org.grails:grails-plugin-url-mappings" |
| 54 | + implementation "org.grails:grails-plugin-interceptors" |
| 55 | + implementation "org.grails.plugins:cache" |
| 56 | + implementation "org.grails.plugins:async" |
| 57 | + implementation "org.grails.plugins:scaffolding" |
| 58 | + implementation "org.grails.plugins:gsp" |
| 59 | + profile "org.grails.profiles:web-plugin" |
| 60 | + runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:3.3.4" |
| 61 | + testImplementation "io.micronaut:micronaut-inject-groovy" |
| 62 | + testImplementation "org.grails:grails-gorm-testing-support" |
| 63 | + testImplementation "org.mockito:mockito-core" |
| 64 | + testImplementation "org.grails:grails-web-testing-support" |
72 | 65 |
|
73 |
| - provided "org.grails:grails-web-boot" |
74 |
| - provided "org.grails:grails-dependencies" |
75 |
| - provided 'javax.servlet:javax.servlet-api:3.1.0' |
| 66 | + // quartz translator https://www.freeformatter.com/cron-expression-generator-quartz.html |
| 67 | + // Quartz scheduler |
| 68 | + // http://www.quartz-scheduler.org/api/2.3.0/index.html |
| 69 | + // http://www.quartz-scheduler.org/documentation/quartz-2.3.0/ |
| 70 | + // http://www.quartz-scheduler.org/documentation/ |
| 71 | + implementation("org.quartz-scheduler:quartz:2.3.2") { |
| 72 | + exclude group: 'slf4j-api', module: 'c3p0' |
| 73 | + } |
| 74 | + // Quartz |
| 75 | + // https://grails-plugins.github.io/grails-quartz/latest/ |
| 76 | + implementation "org.grails.plugins:quartz:2.0.13" |
76 | 77 |
|
77 |
| - compile "org.grails.plugins:quartz:2.0.0.M4" |
78 |
| - compile "org.grails.plugins:asset-pipeline:$grailsVersion" |
| 78 | + // for future upgrade to grails 7 |
| 79 | + // implementation 'org.grails.plugins:quartz:4.0.0-SNAPSHOT' |
79 | 80 |
|
80 |
| - testCompile "org.grails:grails-plugin-testing" |
| 81 | +} |
81 | 82 |
|
82 |
| - console "org.grails:grails-console" |
| 83 | +bootRun { |
| 84 | + ignoreExitValue true |
| 85 | + jvmArgs( |
| 86 | + '-Dspring.output.ansi.enabled=always', |
| 87 | + '-noverify', |
| 88 | + '-XX:TieredStopAtLevel=1', |
| 89 | + '-Xmx1024m') |
| 90 | + sourceResources sourceSets.main |
| 91 | + String springProfilesActive = 'spring.profiles.active' |
| 92 | + systemProperty springProfilesActive, System.getProperty(springProfilesActive) |
| 93 | +} |
| 94 | + |
| 95 | +tasks.withType(GroovyCompile) { |
| 96 | + configure(groovyOptions) { |
| 97 | + forkOptions.jvmArgs = ['-Xmx1024m'] |
| 98 | + } |
83 | 99 | }
|
84 | 100 |
|
85 |
| -task wrapper(type: Wrapper) { |
86 |
| - gradleVersion = gradleWrapperVersion |
| 101 | +tasks.withType(Test) { |
| 102 | + useJUnitPlatform() |
| 103 | +} |
| 104 | +// enable if you wish to package this plugin as a standalone application |
| 105 | +bootJar.enabled = false |
| 106 | + |
| 107 | + |
| 108 | +assets { |
| 109 | + packagePlugin = true |
87 | 110 | }
|
0 commit comments