From ed4f858f6f7152142b33ff8d821555ed61a355b0 Mon Sep 17 00:00:00 2001 From: Mattias Reichel Date: Tue, 7 Nov 2023 08:48:31 +0100 Subject: [PATCH] Change line endings to CRLF. Also add back line that was taken out by mistake. --- plugin/build.gradle | 322 ++++++++++++++++++++++---------------------- 1 file changed, 162 insertions(+), 160 deletions(-) diff --git a/plugin/build.gradle b/plugin/build.gradle index ad50dd57..1ecf5c05 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -1,160 +1,162 @@ -plugins { - id "groovy" - id "java-library" - id "org.grails.grails-gsp" - id "org.grails.grails-web" - id "war" - id "idea" - id "eclipse" - id 'org.asciidoctor.jvm.convert' - id "io.spring.dependency-management" - id 'org.grails.grails-plugin' - id 'maven-publish' - id 'signing' -} - -group = 'org.grails.plugins' -version = project.projectVersion - -ext."signing.keyId" = project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : System.getenv('SIGNING_KEY') -ext."signing.secretKeyRingFile" = project.hasProperty("signing.secretKeyRingFile") ? project.getProperty('signing.secretKeyRingFile') : "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg" -ext."signing.password" = project.hasProperty("signing.password") ? project.getProperty('signing.password') : System.getenv('SIGNING_PASSPHRASE') -ext.pomInfo = { - delegate.name "Grails spring-security-core plugin" - delegate.description 'The Spring Security plugin simplifies the integration of Spring Security into GrailsĀ® framework applications.' - delegate.url project.hasProperty('vcsUrl') ? project.vcsUrl : "https://github.com/grails-plugins/$project.name" - - delegate.licenses { - delegate.license { - delegate.name 'The Apache Software License, Version 2.0' - delegate.url 'https://www.apache.org/licenses/LICENSE-2.0.txt' - delegate.distribution 'repo' - } - } - - delegate.scm { - delegate.url "scm:git@github.com:${githubSlug}.git" - delegate.connection "scm:git@github.com:${githubSlug}.git" - delegate.developerConnection "scm:git@github.com:${githubSlug}.git" - } - - if (developers) { - delegate.developers { - for (dev in developers.split(',')) { - delegate.developer { - delegate.id dev.toLowerCase().replace(' ', '') - delegate.name dev - } - } - } - } -} - -java { - withJavadocJar() - withSourcesJar() -} - -repositories { - mavenCentral() - maven { url 'https://repo.grails.org/grails/core' } -} - -dependencyManagement { - imports { - mavenBom "org.grails:grails-bom:$grailsVersion" - } - applyMavenExclusions false -} - -configurations { - all { - resolutionStrategy.force 'org.codehaus.groovy:groovy-xml:3.0.13' - resolutionStrategy.eachDependency { DependencyResolveDetails details-> - if (details.requested.group == 'org.seleniumhq.selenium') { - details.useVersion('4.10.0') - } - } - } -} - -dependencies { - compileOnly "javax.servlet:javax.servlet-api:$javaxServletApiVersion" - compileOnly 'org.grails:grails-dependencies' - compileOnly 'org.grails:grails-web-boot' - compileOnly 'org.springframework.boot:spring-boot-starter-logging' - compileOnly "net.sf.ehcache:ehcache:$ehcacheVersion" - api "org.springframework.security:spring-security-core:$springSecurityVersion", { - ['spring-aop', 'spring-beans', 'spring-context', 'spring-core', 'spring-expression'].each { - exclude module: it - } - } - api "org.springframework.security:spring-security-web:$springSecurityVersion", { - exclude module: 'spring-web' - } - - testImplementation "org.grails:grails-gorm-testing-support:$grailsTestingSupportVersion" - testImplementation "org.grails:grails-web-testing-support:$grailsTestingSupportVersion" - testRuntimeOnly 'cglib:cglib-nodep:3.3.0' -} - -tasks.named("compileGroovyPages").configure { - classpath += configurations.compileClasspath -} - -apply from: "${rootProject.projectDir}/gradle/docs.gradle" -apply from: "${rootProject.projectDir}/gradle/cleanBuild.gradle" -apply from: "${rootProject.projectDir}/gradle/testVerbose.gradle" - -publishing { - if (isSnapshot) { - repositories { - maven { - credentials { - def u = System.getenv("ARTIFACTORY_USERNAME") ?: project.hasProperty("artifactoryPublishUsername") ? project.artifactoryPublishUsername : '' - def p = System.getenv("ARTIFACTORY_PASSWORD") ?: project.hasProperty("artifactoryPublishPassword") ? project.artifactoryPublishPassword : '' - username = u - password = p - } - url "https://repo.grails.org/grails/plugins3-snapshots-local" - } - } - } - - publications { - maven(MavenPublication) { - artifactId project.name - from components.java - artifact source: "${buildDir}/classes/groovy/main/META-INF/grails-plugin.xml", - classifier: "plugin", - extension: 'xml' - - versionMapping { - usage('java-api') { - fromResolutionOf('runtimeClasspath') - } - usage('java-runtime') { - fromResolutionResult() - } - } - pom.withXml { - def xml = asNode() - - xml.children().last() + pomInfo - // dependency management shouldn't be included - def n = xml.get("dependencyManagement") - if (n) - xml.remove(n) - } - - } - } -} - -signing { - sign publishing.publications.maven -} - -tasks.withType(Sign) { - onlyIf { isReleaseVersion } -} +plugins { + id "groovy" + id "java-library" + id "org.grails.grails-gsp" + id "org.grails.grails-web" + id "war" + id "idea" + id "eclipse" + id 'org.asciidoctor.jvm.convert' + id "io.spring.dependency-management" + id 'org.grails.grails-plugin' + id 'maven-publish' + id 'signing' +} + +group = 'org.grails.plugins' +version = project.projectVersion + +ext."signing.keyId" = project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : System.getenv('SIGNING_KEY') +ext."signing.secretKeyRingFile" = project.hasProperty("signing.secretKeyRingFile") ? project.getProperty('signing.secretKeyRingFile') : "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg" +ext."signing.password" = project.hasProperty("signing.password") ? project.getProperty('signing.password') : System.getenv('SIGNING_PASSPHRASE') +ext.pomInfo = { + delegate.name "Grails spring-security-core plugin" + delegate.description 'The Spring Security plugin simplifies the integration of Spring Security into GrailsĀ® framework applications.' + delegate.url project.hasProperty('vcsUrl') ? project.vcsUrl : "https://github.com/grails-plugins/$project.name" + + delegate.licenses { + delegate.license { + delegate.name 'The Apache Software License, Version 2.0' + delegate.url 'https://www.apache.org/licenses/LICENSE-2.0.txt' + delegate.distribution 'repo' + } + } + + delegate.scm { + delegate.url "scm:git@github.com:${githubSlug}.git" + delegate.connection "scm:git@github.com:${githubSlug}.git" + delegate.developerConnection "scm:git@github.com:${githubSlug}.git" + } + + if (developers) { + delegate.developers { + for (dev in developers.split(',')) { + delegate.developer { + delegate.id dev.toLowerCase().replace(' ', '') + delegate.name dev + } + } + } + } +} + +java { + withJavadocJar() + withSourcesJar() +} + +repositories { + mavenCentral() + maven { url 'https://repo.grails.org/grails/core' } +} + +dependencyManagement { + imports { + mavenBom "org.grails:grails-bom:$grailsVersion" + } + applyMavenExclusions false +} + +configurations { + all { + resolutionStrategy.force 'org.codehaus.groovy:groovy-xml:3.0.13' + resolutionStrategy.eachDependency { DependencyResolveDetails details-> + if (details.requested.group == 'org.seleniumhq.selenium') { + details.useVersion('4.10.0') + } + } + } +} + +sourceCompatibility = targetCompatibility = 1.11 + +dependencies { + compileOnly "javax.servlet:javax.servlet-api:$javaxServletApiVersion" + compileOnly 'org.grails:grails-dependencies' + compileOnly 'org.grails:grails-web-boot' + compileOnly 'org.springframework.boot:spring-boot-starter-logging' + compileOnly "net.sf.ehcache:ehcache:$ehcacheVersion" + api "org.springframework.security:spring-security-core:$springSecurityVersion", { + ['spring-aop', 'spring-beans', 'spring-context', 'spring-core', 'spring-expression'].each { + exclude module: it + } + } + api "org.springframework.security:spring-security-web:$springSecurityVersion", { + exclude module: 'spring-web' + } + + testImplementation "org.grails:grails-gorm-testing-support:$grailsTestingSupportVersion" + testImplementation "org.grails:grails-web-testing-support:$grailsTestingSupportVersion" + testRuntimeOnly 'cglib:cglib-nodep:3.3.0' +} + +tasks.named("compileGroovyPages").configure { + classpath += configurations.compileClasspath +} + +apply from: "${rootProject.projectDir}/gradle/docs.gradle" +apply from: "${rootProject.projectDir}/gradle/cleanBuild.gradle" +apply from: "${rootProject.projectDir}/gradle/testVerbose.gradle" + +publishing { + if (isSnapshot) { + repositories { + maven { + credentials { + def u = System.getenv("ARTIFACTORY_USERNAME") ?: project.hasProperty("artifactoryPublishUsername") ? project.artifactoryPublishUsername : '' + def p = System.getenv("ARTIFACTORY_PASSWORD") ?: project.hasProperty("artifactoryPublishPassword") ? project.artifactoryPublishPassword : '' + username = u + password = p + } + url "https://repo.grails.org/grails/plugins3-snapshots-local" + } + } + } + + publications { + maven(MavenPublication) { + artifactId project.name + from components.java + artifact source: "${buildDir}/classes/groovy/main/META-INF/grails-plugin.xml", + classifier: "plugin", + extension: 'xml' + + versionMapping { + usage('java-api') { + fromResolutionOf('runtimeClasspath') + } + usage('java-runtime') { + fromResolutionResult() + } + } + pom.withXml { + def xml = asNode() + + xml.children().last() + pomInfo + // dependency management shouldn't be included + def n = xml.get("dependencyManagement") + if (n) + xml.remove(n) + } + + } + } +} + +signing { + sign publishing.publications.maven +} + +tasks.withType(Sign) { + onlyIf { isReleaseVersion } +}