Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails 7: grails-spring-security-ldap #27

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Java CI
on:
push:
branches:
- '[5-9]+.[0-9]+.x'
pull_request:
branches:
- '[5-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Run Tests
if: github.event_name == 'pull_request'
id: tests
uses: gradle/gradle-build-action@v2
with:
arguments: check -Dgeb.env=chromeHeadless
- name: Run Build
if: github.event_name == 'push'
id: build
uses: gradle/gradle-build-action@v2
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: build -Dgeb.env=chromeHeadless
- name: Publish Test Report
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Publish to repo.grails.org
id: publish
uses: gradle/gradle-build-action@v2
if: steps.build.outcome == 'success' && github.event_name == 'push'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Build Status](https://travis-ci.org/grails-plugins/grails-spring-security-ldap.svg)](https://travis-ci.org/grails-plugins/grails-spring-security-ldap)

Grails Spring Security LDAP Plugin
==================================

Expand All @@ -19,5 +17,6 @@ See [documentation](https://grails-plugins.github.io/grails-spring-security-ldap

Branches:

- `master` Grails 4 compatible versions.
- '5.0.x' Grails 7 compatible versions.
- '4.0.x' Grails 4 compatible versions.
- `3.x` Grails 3 compatible versions.
61 changes: 38 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,72 +11,75 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.asciidoctor:asciidoctor-gradle-jvm:3.1.0"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
classpath "org.asciidoctor:asciidoctor-gradle-jvm:4.0.3"
}
}

plugins {
id 'io.spring.dependency-management' version '0.5.2.RELEASE'
id 'com.jfrog.bintray' version '1.2'
id 'io.spring.dependency-management' version '1.1.6'
id 'maven-publish'
id 'groovy'
id 'java-library'
}

version = file('version.txt').text.trim()
version = projectVersion
group 'org.grails.plugins'

apply plugin: 'org.grails.grails-plugin'
apply plugin: 'org.grails.grails-plugin-publish'
apply plugin: "org.asciidoctor.jvm.convert"
apply plugin: "com.jfrog.artifactory"

ext {
grailsVersion = project.grailsVersion
}

sourceCompatibility = targetCompatibility = 1.8
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

repositories {
mavenLocal()
mavenCentral()
maven { url 'https://repo.grails.org/grails/core' }
}

dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
subprojects {
configurations {
all {
resolutionStrategy.eachDependency { DependencyResolveDetails details->
if (details.requested.group == 'org.seleniumhq.selenium') {
details.useVersion(seleniumVersion)
}
}
}
}
}

dependencies {
runtimeOnly 'org.grails:grails-web-boot'

provided 'javax.servlet:javax.servlet-api:3.1.0'
provided 'org.grails:grails-dependencies'
provided 'org.grails:grails-web-boot'

compile 'org.grails.plugins:spring-security-core:4.0.0'
api "org.grails.plugins:spring-security-core:$grailsSpringSecurityCoreVersion"

compile "org.springframework.security:spring-security-ldap:$springSecurityVersion", {
api "org.springframework.security:spring-security-ldap:$springSecurityVersion", {
['apacheds-core', 'apacheds-core-entry', 'apacheds-protocol-ldap', 'apacheds-protocol-shared',
'apacheds-server-jndi', 'commons-logging', 'fest-assert', 'jcl-over-slf4j', 'junit',
'ldapsdk', 'logback-classic', 'mockito-core', 'shared-ldap', 'slf4j-api', 'spring-beans',
'spring-context', 'spring-core', 'spring-ldap-core', 'spring-security-core',
'spring-test', 'spring-tx'].each { exclude module: it }
}

compile "org.springframework.ldap:spring-ldap-core:$springLdapCoreVersion", {
api "org.springframework.ldap:spring-ldap-core:$springLdapCoreVersion", {
['commons-lang', 'gsbase', 'junit', 'mockito-core', 'powermock-api-mockito',
'powermock-api-support', 'powermock-core', 'powermock-module-junit4',
'powermock-module-junit4-common', 'powermock-reflect', 'slf4j-log4j12', 'spring-beans',
'spring-core', 'spring-data-commons', 'spring-test', 'spring-tx'].each { exclude module: it }
}

console 'org.grails:grails-console'
testCompile "org.grails:grails-web-testing-support"
testImplementation "org.grails:grails-web-testing-support"
}

apply from: "${rootProject.projectDir}/gradle/grailsPublish.gradle"
apply from: "${rootProject.projectDir}/gradle/artifactoryPublish.gradle"
apply from: "${rootProject.projectDir}/gradle/testVerbose.gradle"

asciidoctor {
Expand All @@ -102,3 +105,15 @@ task docs(dependsOn: asciidoctor) {
}

}

publishing {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = project.name
version = project.version

from components.java
}
}
}
122 changes: 50 additions & 72 deletions functional-test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.2"
classpath "org.grails.plugins:hibernate5:7.0.0"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.10"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:3.2"
classpath "org.grails.plugins:hibernate5:9.0.0-SNAPSHOT"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:5.0.1"
}
}

Expand All @@ -26,96 +26,74 @@ repositories {
maven { url "https://repo.grails.org/grails/core" }
}

configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}

dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.4.0.Final"
compile "org.grails.plugins:gsp"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core-jakarta:5.6.15.Final"
implementation "org.grails.plugins:gsp"

compile "org.grails.plugins:spring-security-ldap:${file('../version.txt').text.trim()}"
compile 'org.grails.plugins:ldap-server:1.0.0'
implementation project(":")

implementation 'org.apache.directory.server:apacheds-core:1.5.4'
implementation 'org.apache.directory.server:apacheds-protocol-ldap:1.5.4'

compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
runtime "javax.xml.bind:jaxb-api:2.3.0"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails.plugins:geb"
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.141.59"
testCompile "org.seleniumhq.selenium:selenium-api:3.141.59"
testCompile "org.seleniumhq.selenium:selenium-support:3.141.59"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.141.59"
testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:3.141.59"
testCompile "org.seleniumhq.selenium:htmlunit-driver:2.35.1"
testRuntime 'net.sourceforge.htmlunit:htmlunit:2.35.0'
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:5.0.1"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.grails.plugins:geb"
testImplementation "org.gebish:geb-core:7.0"
testImplementation "org.gebish:geb-spock:7.0"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
testImplementation "org.spockframework:spock-core"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-safari-driver:$seleniumVersion"
runtimeOnly "org.fusesource.jansi:jansi:1.18"
}

apply from: "../gradle/testVerbose.gradle"

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) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}

webdriverBinaries {
chromedriver {
version = '80.0.3987.16'
}
geckodriver {
version = '0.26.0'
}
}
tasks.withType(Test) {
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')
if (System.getenv('CHROMEWEBDRIVER')) {
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
}
if (System.getenv('GECKOWEBDRIVER')) {
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}
}


assets {
minifyJs = true
minifyCss = true
Expand Down
5 changes: 0 additions & 5 deletions functional-test-app/gradle.properties

This file was deleted.

Binary file not shown.
6 changes: 0 additions & 6 deletions functional-test-app/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading