-
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
2 changed files
with
172 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,73 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url "https://repo.grails.org/grails/core" } | ||
repositories { | ||
mavenCentral() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
maven { url 'https://repo.gradle.org/gradle/libs-releases' } | ||
} | ||
dependencies { | ||
classpath "org.grails:grails-gradle-plugin:$grailsVersion" | ||
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.6.1' | ||
if (project.projectVersion.endsWith('-SNAPSHOT')) { | ||
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } | ||
} | ||
} | ||
dependencies { | ||
classpath "org.graceframework:grace-gradle-plugin:$graceVersion" | ||
classpath "io.github.gradle-nexus:publish-plugin:1.3.0" | ||
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion" | ||
} | ||
} | ||
} | ||
|
||
ext { | ||
commonBuild = 'https://raw.githubusercontent.com/rainboyan/grails-common-build/22.0.x' | ||
} | ||
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") | ||
|
||
version project.projectVersion | ||
group "org.grails.plugins" | ||
|
||
apply plugin:"eclipse" | ||
apply plugin:"idea" | ||
apply plugin:"java-library" | ||
apply plugin:"org.grails.grails-plugin" | ||
apply plugin:"org.grails.internal.grails-plugin-publish" | ||
apply plugin:"org.grails.grails-gsp" | ||
group "org.graceframework.plugins" | ||
|
||
apply plugin: "eclipse" | ||
apply plugin: "idea" | ||
apply plugin: "java-library" | ||
apply plugin: "org.graceframework.grace-plugin" | ||
apply plugin: "org.graceframework.grace-gsp" | ||
apply plugin: "com.github.erdi.webdriver-binaries" | ||
// apply from: resources.text.fromInsecureUri("${commonBuild}/common-docs.gradle") | ||
apply plugin: "io.github.gradle-nexus.publish-plugin" | ||
apply plugin: "maven-publish" | ||
apply plugin: "signing" | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
mavenCentral() | ||
maven { url "https://repo.grails.org/grails/core" } | ||
if (project.projectVersion.endsWith('-SNAPSHOT')) { | ||
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } | ||
} | ||
} | ||
|
||
configurations { | ||
documentation | ||
} | ||
|
||
dependencies { | ||
compileOnly "org.grails:grails-boot" | ||
api "org.grails:grails-core" | ||
api "org.grails:grails-datastore-core:$gormVersion" | ||
api "org.grails:grails-datastore-gorm:$gormVersion" | ||
api "org.graceframework:grace-datastore-core:$gormVersion" | ||
api "org.graceframework:grace-datastore-gorm:$gormVersion" | ||
api "org.graceframework:grace-core:$graceVersion" | ||
api "org.graceframework:grace-web-gsp:$graceGspVersion" | ||
api 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2' | ||
api "org.grails:grails-web-gsp:$grailsGspVersion" | ||
testImplementation "org.grails.plugins:geb:$gebVersion" | ||
profile "org.grails.profiles:web-plugin" | ||
testImplementation "org.grails:grails-gorm-testing-support" | ||
testImplementation "org.grails:grails-web-testing-support" | ||
compileOnly "org.graceframework:grace-boot:$graceVersion" | ||
documentation "org.fusesource.jansi:jansi:1.18" | ||
documentation "com.github.javaparser:javaparser-core:3.15.14" | ||
|
||
testImplementation "org.graceframework:grace-test-support:$graceVersion" | ||
testImplementation 'org.codehaus.gpars:gpars:1.2.1', { | ||
exclude group:'org.multiverse', module:'multiverse-core' | ||
exclude group:'org.codehaus.groovy', module: 'groovy-all' | ||
} | ||
testImplementation 'javassist:javassist:3.12.0.GA' | ||
testImplementation "org.codehaus.groovy:groovy-dateutil:$groovyVersion" | ||
testImplementation "cglib:cglib-nodep:$cglibNodepVersion" | ||
testImplementation("org.jodd:jodd-wot:$joddWotVersion") { | ||
exclude module: 'slf4j-api' | ||
exclude module: 'asm' | ||
} | ||
testImplementation "org.mockito:mockito-core" | ||
testImplementation "org.grails.plugins:geb" | ||
testImplementation "org.graceframework.plugins:geb" | ||
testImplementation "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion" | ||
testImplementation "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion" | ||
testImplementation "org.seleniumhq.selenium:selenium-safari-driver:$seleniumSafariDriverVersion" | ||
|
@@ -56,10 +77,8 @@ dependencies { | |
testImplementation "org.seleniumhq.selenium:selenium-htmlunit-driver:2.52.0" | ||
testImplementation "net.sourceforge.htmlunit:htmlunit:2.18" | ||
} | ||
apply from: rootProject.file('gradle/testVerbose.gradle') | ||
|
||
sourceCompatibility = 11 | ||
targetCompatibility = 11 | ||
apply from: rootProject.file('gradle/testVerbose.gradle') | ||
|
||
webdriverBinaries { | ||
if (!System.getenv().containsKey('GITHUB_ACTIONS')) { | ||
|
@@ -81,39 +100,113 @@ tasks.withType(Test) { | |
} | ||
} | ||
|
||
bootRun { | ||
jvmArgs( | ||
'-Dspring.output.ansi.enabled=always', | ||
'-noverify', | ||
'-XX:TieredStopAtLevel=1', | ||
'-Xmx1024m') | ||
sourceResources sourceSets.main | ||
String springProfilesActive = 'spring.profiles.active' | ||
systemProperty springProfilesActive, System.getProperty(springProfilesActive) | ||
groovydoc.doFirst { | ||
classpath += (configurations.documentation + configurations.compileClasspath) | ||
} | ||
// enable if you wish to package this plugin as a standalone application | ||
|
||
bootJar.enabled = false | ||
|
||
grailsPublish { | ||
userOrg = 'grails' | ||
githubSlug = 'grails-plugins/grails-cache' | ||
license { | ||
name = 'Apache-2.0' | ||
} | ||
title = project.title | ||
desc = project.projectDesc | ||
developers = [jeffbrown: "Jeff Scott Brown", rainboyan: "Michael Yan"] | ||
} | ||
sourceCompatibility = 11 | ||
targetCompatibility = 11 | ||
|
||
integrationTest { | ||
testLogging { | ||
exceptionFormat = 'full' | ||
} | ||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
jar { | ||
enabled = true | ||
archiveClassifier.set('') | ||
exclude 'cache/Application.class', 'com/demo/**', 'gsp_*', '/gsp/views.properties' | ||
includeEmptyDirs = false | ||
exclude 'gsp_**', 'gsp/**' | ||
} | ||
|
||
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 Cache Plugin" | ||
description = "Provides AST transformations for caching method calls" | ||
url = 'https://github.com/graceframework/grace-cache' | ||
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/graceframework/grace-cache.git' | ||
developerConnection = 'scm:git:ssh://github.com:graceframework/grace-cache.git' | ||
url = 'https://github.com/graceframework/grace-cache' | ||
} | ||
} | ||
|
||
pom.withXml { | ||
def pomNode = asNode() | ||
|
||
try { | ||
pomNode.dependencyManagement.replaceNode {} | ||
} catch (Throwable e) { | ||
// ignore | ||
} | ||
|
||
// simply remove dependencies without a version | ||
// version-less dependencies are handled with dependencyManagement | ||
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions | ||
pomNode.dependencies.dependency.findAll { | ||
it.version.text().isEmpty() | ||
}.each { | ||
try { | ||
it.replaceNode {} | ||
} catch (Throwable e) { | ||
// ignore | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : '' | ||
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : '' | ||
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : '' | ||
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") | ||
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
username = ossUser | ||
password = ossPass | ||
stagingProfileId = ossStagingProfileId | ||
} | ||
} | ||
} | ||
|
||
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,16 +1,22 @@ | ||
projectVersion=5.2.0 | ||
grailsVersion=2022.1.3 | ||
grailsGspVersion=2022.1.2 | ||
gormVersion=2022.2.0 | ||
githubSlug=grails-plugins/grails-cache | ||
projectVersion=5.2.0-SNAPSHOT | ||
graceVersion=2022.1.2 | ||
graceGspVersion=2022.1.2 | ||
gormVersion=2022.1.2 | ||
groovyVersion=3.0.11 | ||
cglibNodepVersion=3.2.9 | ||
joddWotVersion=3.3.8 | ||
servletApiVersion=4.0.1 | ||
chromeDriverVersion=87.0.4280.20 | ||
gebVersion=5.4.1 | ||
geckodriverVersion=0.24.0 | ||
seleniumSafariDriverVersion=3.14.0 | ||
seleniumVersion=3.141.59 | ||
webdriverBinariesVersion=2.6 | ||
asciidoc=true | ||
githubSlug=graceframework/grace-cache | ||
githubBranch=master | ||
title=Cache Plugin | ||
projectDesc=Provides AST transformations for caching method calls | ||
guide=../../guide | ||
tags=../ref/Tags | ||
gebVersion=3.0.0 | ||
seleniumVersion=3.141.59 | ||
webdriverBinariesVersion=2.6 | ||
chromeDriverVersion=87.0.4280.20 | ||
geckodriverVersion=0.24.0 | ||
seleniumSafariDriverVersion=3.14.0 | ||
projectUrl=https://github.com/graceframework/grace-cache | ||
developers=Michael Yan |