-
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
10 changed files
with
248 additions
and
98 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
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,16 @@ | ||
package grace.demos | ||
|
||
class UrlMappings { | ||
|
||
static mappings = { | ||
"/$controller/$action?/$id?(.$format)?"{ | ||
constraints { | ||
// apply constraints here | ||
} | ||
} | ||
|
||
"/"(view:"/index") | ||
"500"(view:'/error') | ||
"404"(view:'/notFound') | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...framework/plugins/htmx/Application.groovy → app/init/grace/demos/Application.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
2 changes: 1 addition & 1 deletion
2
...ceframework/plugins/htmx/BootStrap.groovy → app/init/grace/demos/BootStrap.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.graceframework.plugins.htmx | ||
package grace.demos | ||
|
||
class BootStrap { | ||
|
||
|
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,48 +1,107 @@ | ||
buildscript { | ||
repositories { | ||
// mavenLocal() | ||
mavenCentral() | ||
maven { url "https://repo.gradle.org/gradle/libs-releases" } | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
maven { url 'https://repo.gradle.org/gradle/libs-releases' } | ||
} | ||
dependencies { | ||
classpath "io.github.gradle-nexus:publish-plugin:1.3.0" | ||
classpath "org.graceframework:grace-gradle-plugin:$graceVersion" | ||
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:3.2" | ||
classpath "org.graceframework.plugins:asset-pipeline-gradle:5.2.4" | ||
} | ||
} | ||
|
||
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' | ||
} | ||
|
||
group "grace.demos" | ||
version projectVersion | ||
group "org.graceframework.plugins" | ||
|
||
apply plugin: "eclipse" | ||
apply plugin: "idea" | ||
apply plugin: "groovy" | ||
apply plugin: "war" | ||
apply plugin: "io.github.gradle-nexus.publish-plugin" | ||
apply plugin: "maven-publish" | ||
apply plugin: "signing" | ||
apply plugin: "org.graceframework.grace-web" | ||
apply plugin: "com.github.erdi.webdriver-binaries" | ||
apply plugin: "org.graceframework.asset-pipeline" | ||
apply plugin: "org.graceframework.grace-gsp" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
configurations { | ||
developmentOnly | ||
} | ||
|
||
grails { | ||
plugins { | ||
implementation project(":plugin") | ||
} | ||
} | ||
|
||
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" | ||
developmentOnly('org.springframework.boot:spring-boot-devtools') | ||
compileOnly "io.micronaut:micronaut-inject-groovy" | ||
console "org.graceframework:grace-console" | ||
implementation "org.springframework.boot:spring-boot-starter-logging" | ||
implementation "org.springframework.boot:spring-boot-starter-validation" | ||
implementation "org.springframework.boot:spring-boot-autoconfigure" | ||
implementation "org.graceframework:grace-core" | ||
implementation "org.springframework.boot:spring-boot-starter-actuator" | ||
implementation "org.springframework.boot:spring-boot-starter-tomcat" | ||
implementation "org.graceframework:grace-boot" | ||
implementation "org.graceframework:grace-logging" | ||
implementation "org.graceframework:grace-plugin-controllers" | ||
implementation "org.graceframework:grace-plugin-codecs" | ||
implementation "org.graceframework:grace-plugin-databinding" | ||
implementation "org.graceframework:grace-plugin-datasource" | ||
implementation "org.graceframework:grace-plugin-domain-class" | ||
implementation "org.graceframework:grace-plugin-i18n" | ||
implementation "org.graceframework:grace-plugin-interceptors" | ||
implementation "org.graceframework:grace-plugin-management" | ||
implementation "org.graceframework:grace-plugin-rest" | ||
implementation "org.graceframework:grace-plugin-services" | ||
implementation "org.graceframework:grace-plugin-url-mappings" | ||
implementation "org.graceframework.plugins:cache" | ||
implementation "org.graceframework.plugins:async" | ||
implementation "org.graceframework.plugins:scaffolding" | ||
implementation "org.graceframework.plugins:fields" | ||
implementation "org.graceframework.plugins:events" | ||
implementation "org.graceframework.plugins:hibernate5" | ||
implementation "org.hibernate:hibernate-core:5.6.15.Final" | ||
implementation "org.graceframework:grace-plugin-gsp" | ||
profile "org.graceframework.profiles:web" | ||
runtimeOnly "com.h2database:h2" | ||
runtimeOnly "org.apache.tomcat:tomcat-jdbc" | ||
runtimeOnly "jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" | ||
runtimeOnly "jakarta.el:jakarta.el-api:3.0.3" | ||
runtimeOnly "org.glassfish:jakarta.el:3.0.4" | ||
runtimeOnly "org.graceframework.plugins:asset-pipeline-plugin:5.2.4" | ||
testImplementation "io.micronaut:micronaut-inject-groovy" | ||
testImplementation "org.graceframework:grace-test-support" | ||
testImplementation "org.mockito:mockito-core" | ||
testImplementation "org.graceframework.plugins:geb" | ||
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:4.2.2" | ||
testImplementation "org.seleniumhq.selenium:selenium-api:4.2.2" | ||
testImplementation "org.seleniumhq.selenium:selenium-support:4.2.2" | ||
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:4.2.2" | ||
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:4.2.2" | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
tasks.withType(Sign) { | ||
onlyIf { isReleaseVersion } | ||
bootRun { | ||
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) { | ||
|
@@ -55,70 +114,25 @@ tasks.withType(Test) { | |
useJUnitPlatform() | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
webdriverBinaries { | ||
chromedriver { | ||
version = '122.0.6260.0' | ||
fallbackTo32Bit = true | ||
} | ||
withJavadocJar() | ||
withSourcesJar() | ||
geckodriver '0.33.0' | ||
} | ||
|
||
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 Htmx Plugin", | ||
"Implementation-Version": projectVersion, | ||
"Implementation-Vendor": 'Grace Plugins') | ||
enabled = true | ||
archiveClassifier.set('') | ||
includeEmptyDirs = false | ||
tasks.withType(Test) { | ||
useJUnitPlatform() | ||
systemProperty "geb.env", System.getProperty('geb.env') | ||
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest") | ||
systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver') | ||
systemProperty 'webdriver.gecko.driver', System.getProperty('webdriver.gecko.driver') | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId = project.group | ||
artifactId = project.name | ||
version = project.version | ||
|
||
versionMapping { | ||
usage('java-api') { | ||
fromResolutionOf('runtimeClasspath') | ||
} | ||
usage('java-runtime') { | ||
fromResolutionResult() | ||
} | ||
} | ||
|
||
from components.java | ||
|
||
pom { | ||
name = "Grace Htmx Plugin" | ||
description = "Grace Plugin for using Grace with htmx." | ||
url = 'https://github.com/grace-plugins/grace-htmx' | ||
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-htmx.git' | ||
developerConnection = 'scm:git:ssh://github.com:grace-plugins/grace-htmx.git' | ||
url = 'https://github.com/grace-plugins/grace-htmx' | ||
} | ||
} | ||
} | ||
} | ||
assets { | ||
minifyJs = true | ||
minifyCss = true | ||
} | ||
|
||
nexusPublishing { | ||
|
@@ -135,10 +149,3 @@ nexusPublishing { | |
} | ||
} | ||
} | ||
|
||
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
projectVersion=0.5.0-SNAPSHOT | ||
graceVersion=2020.0.0 | ||
groovyVersion=3.0.11 | ||
graceVersion=2022.2.4 | ||
groovyVersion=3.0.17 | ||
org.gradle.daemon=true | ||
org.gradle.parallel=true | ||
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M |
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 +1,3 @@ | ||
rootProject.name = 'htmx' | ||
rootProject.name = 'grace-htmx' | ||
|
||
include 'plugin' |
Oops, something went wrong.