| plugins { |
| id 'groovy' |
| id 'java-library' |
| } |
| |
| version = projectVersion |
| group = 'org.apache.grails.data' |
| |
| dependencies { |
| |
| implementation platform("org.apache.grails:grails-bom:$grailsVersion") |
| api platform("org.apache.grails:grails-bom:$grailsVersion") |
| |
| api project(':grails-datastore-core'), { |
| // api: AssociationQueryExecutor, Datastore, GrailsArtefactClassInjector, ProxyFactory, ProxyHandler, Session |
| // impl: AstUtils, PropertySourcesConfig |
| if (excludeUnusedTransDeps) { |
| // API dependencies in grails-datastore-core |
| exclude group: 'jakarta.persistence', module: 'jakarta.persistence-api' |
| //exclude group: 'org.javassist', module: 'javassist' // (test) |
| exclude group: 'org.springframework', module: 'spring-context' |
| exclude group: 'org.springframework', module: 'spring-core' |
| exclude group: 'org.springframework', module: 'spring-tx' |
| } |
| } |
| api project(':grails-datastore-gorm'), { |
| // api: AbstractDatastorePersistenceContextInterceptor |
| // impl: GormEntityTransformation |
| if (excludeUnusedTransDeps) { |
| // API dependencies in grails-datastore-gorm |
| exclude group: 'jakarta.annotation', module: 'jakarta.annotation-api' |
| //exclude group: 'jakarta.persistence', module: 'jakarta.persistence-api' // Entity (test) |
| exclude group: 'org.apache.grails.data', module: 'grails-datastore-core' |
| exclude group: 'org.apache.grails.data', module: 'grails-datamapping-validation' |
| exclude group: 'org.springframework', module: 'spring-context' |
| exclude group: 'org.springframework', module: 'spring-jdbc' |
| //exclude group: 'org.springframework', module: 'spring-tx' // TransactionDefinition in GormEntity$Trait$Helper (test) |
| } |
| } |
| api 'org.apache.grails:grails-core', { |
| // api: AstTransformer, EntityProxyHandler, PersistenceContextInterceptor |
| // impl: PropertySourcesConfig |
| if (excludeUnusedTransDeps) { |
| // API dependencies in grails-core |
| exclude group: 'jakarta.annotation', module: 'jakarta.annotation-api' |
| exclude group: 'jakarta.inject', module: 'jakarta.inject-api' |
| exclude group: 'jakarta.persistence', module: 'jakarta.persistence-api' |
| //exclude group: 'org.apache.grails.bootstrap', module: 'grails-bootstrap' // Resource |
| exclude group: 'org.apache.grails.data', module: 'grails-datastore-core' |
| exclude group: 'org.apache.grails', module: 'grails-spring' |
| exclude group: 'org.springframework', module: 'spring-beans' |
| exclude group: 'org.springframework', module: 'spring-context' |
| exclude group: 'org.springframework', module: 'spring-core' |
| exclude group: 'org.springframework', module: 'spring-tx' |
| exclude group: 'org.springframework.boot', module: 'spring-boot' |
| exclude group: 'org.springframework.boot', module: 'spring-boot-autoconfigure' |
| } |
| exclude group: 'org.grails', module: 'grails-datastore-core' // TODO: Remove after gorm published & core updated |
| } |
| api 'org.springframework:spring-context', { |
| // api: ConfigurableApplicationContext |
| } |
| api 'org.springframework:spring-core', { |
| // api: PropertyResolver |
| // impl: ConfigurableConversionService, Converter |
| } |
| |
| implementation 'org.apache.grails.bootstrap:grails-bootstrap', { |
| // impl: GrailsResourceUtils |
| if (excludeUnusedTransDeps) { |
| // API dependencies in grails-bootstrap |
| exclude group: 'org.yaml', module: 'snakeyaml' |
| } |
| } |
| |
| compileOnly 'org.apache.groovy:groovy', { |
| // comp: CompileStatic |
| } |
| |
| testImplementation 'org.spockframework:spock-core' |
| |
| testRuntimeOnly 'org.slf4j:slf4j-nop' // Get rid of warning about missing slf4j implementation during tests |
| } |
| |
| tasks.withType(Jar).configureEach { |
| // META-INF/grails.factories is also present in grails-core |
| duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
| } |
| |
| apply from: rootProject.layout.projectDirectory.file('gradle/java-config.gradle') |
| apply from: rootProject.layout.projectDirectory.file('gradle/test-config.gradle') |
| apply from: rootProject.layout.projectDirectory.file('gradle/publish-config.gradle') |