-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
ext."signing.keyId" = project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : System.getenv('SIGNING_KEY') | ||
ext."signing.password" = project.hasProperty("signing.password") ? project.getProperty('signing.password') : System.getenv('SIGNING_PASSPHRASE') | ||
ext."signing.secretKeyRingFile" = project.hasProperty("signing.secretKeyRingFile") ? project.getProperty('signing.secretKeyRingFile') : ("${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg") | ||
ext.isReleaseVersion = !projectVersion.endsWith("SNAPSHOT") | ||
|
||
ext { | ||
springBootVersion = '2.6.6' | ||
servletVersion = '4.0.1' | ||
} | ||
|
||
version projectVersion | ||
group "org.graceframework.plugins" | ||
|
||
apply plugin: "eclipse" | ||
apply plugin: "idea" | ||
apply plugin: "groovy" | ||
apply plugin: "maven-publish" | ||
apply plugin: "signing" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compileOnly "org.springframework.boot:spring-boot-autoconfigure:$springBootVersion" | ||
compileOnly "javax.servlet:javax.servlet-api:$servletVersion" | ||
compileOnly "org.graceframework:grace-core:$graceVersion" | ||
compileOnly "org.graceframework:grace-web-common:$graceVersion" | ||
} | ||
|
||
tasks.withType(Sign) { | ||
onlyIf { isReleaseVersion } | ||
} | ||
|
||
tasks.withType(GroovyCompile) { | ||
configure(groovyOptions) { | ||
forkOptions.jvmArgs = ['-Xmx1024m'] | ||
} | ||
} | ||
|
||
tasks.withType(Test) { | ||
useJUnitPlatform() | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
jar { | ||
duplicatesStrategy = DuplicatesStrategy.INCLUDE | ||
manifest.mainAttributes( | ||
"Built-By": System.properties['user.name'], | ||
"Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")", | ||
"Implementation-Title": "Grace Stimulus Plugin", | ||
"Implementation-Version": projectVersion, | ||
"Implementation-Vendor": 'Grace Plugins') | ||
enabled = true | ||
archiveClassifier.set('') | ||
includeEmptyDirs = false | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId = project.group | ||
artifactId = projectName | ||
version = project.version | ||
|
||
versionMapping { | ||
usage('java-api') { | ||
fromResolutionOf('runtimeClasspath') | ||
} | ||
usage('java-runtime') { | ||
fromResolutionResult() | ||
} | ||
} | ||
|
||
from components.java | ||
|
||
pom { | ||
name = "Grace Stimulus Plugin" | ||
description = "Grace Plugin for using Stimulus with Grace." | ||
url = 'https://github.com/grace-plugins/grace-hotwire' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'rainboyan' | ||
name = 'Michael Yan' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/grace-plugins/grace-hotwire.git' | ||
developerConnection = 'scm:git:ssh://github.com:grace-plugins/grace-hotwire.git' | ||
url = 'https://github.com/grace-plugins/grace-hotwire' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
signing { | ||
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") } | ||
sign publishing.publications.maven | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
projectName=stimulus | ||
projectVersion=0.0.1-SNAPSHOT | ||
graceVersion=2020.0.0 | ||
groovyVersion=3.0.11 |
58 changes: 58 additions & 0 deletions
58
.../stimulus/src/main/groovy/org/graceframework/plugins/stimulus/StimulusGrailsPlugin.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.graceframework.plugins.stimulus | ||
|
||
import grails.plugins.* | ||
|
||
class StimulusGrailsPlugin extends Plugin { | ||
|
||
def version = '0.0.1-SNAPSHOT' | ||
// the version or versions of Grails the plugin is designed for | ||
def grailsVersion = "3.0.0 > *" | ||
// resources that are excluded from plugin packaging | ||
def pluginExcludes = [ | ||
"grails-app/views/error.gsp" | ||
] | ||
|
||
def title = "Grace Stimulus Plugin" | ||
def author = "Michael Yan" | ||
def authorEmail = "[email protected]" | ||
def description = '''\ | ||
Use Stimulus in your Grace app. | ||
''' | ||
def profiles = ['web'] | ||
|
||
// URL to the plugin's documentation | ||
def documentation = "https://github.com/grace-plugins/grace-hotwire" | ||
|
||
// Extra (optional) plugin metadata | ||
|
||
// License: one of 'APACHE', 'GPL2', 'GPL3' | ||
def license = "APACHE" | ||
|
||
// Details of company behind the plugin (if there is one) | ||
def organization = [ name: "Grace Plugins", url: "https://github.com/grace-plugins/" ] | ||
|
||
// Any additional developers beyond the author specified above. | ||
def developers = [ [ name: "Michael Yan", email: "[email protected]" ]] | ||
|
||
// Location of the plugin's issue tracker. | ||
def issueManagement = [ system: "GitHub", url: "https://github.com/grace-plugins/grace-hotwire/issues" ] | ||
|
||
// Online location of the plugin's browseable source code. | ||
def scm = [ url: "https://github.com/grace-plugins/grace-hotwire.git" ] | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
plugins/stimulus/src/main/resources/META-INF/grails-plugin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<plugin name='stimulus'> | ||
<type>org.graceframework.plugins.stimulus.StimulusGrailsPlugin</type> | ||
</plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
rootProject.name = 'grace-hotwire' | ||
|
||
include 'plugins:stimulus' | ||
include 'plugins:turbo' |