87 lines
2.1 KiB
Groovy
87 lines
2.1 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'idea'
|
|
id 'java-gradle-plugin'
|
|
id 'maven-publish'
|
|
id 'application'
|
|
id "com.diffplug.spotless" version "6.15.0"
|
|
id 'com.gradle.plugin-publish' version '0.12.0'
|
|
}
|
|
|
|
group = 'gae.piaz'
|
|
version = '1.9'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation 'org.yaml:snakeyaml:1.23' // parse yml
|
|
implementation 'org.slf4j:slf4j-api:1.7.25' // logging
|
|
implementation 'org.slf4j:slf4j-log4j12:1.7.25'
|
|
implementation 'com.google.guava:guava:26.0-jre' // needed but don't know why
|
|
implementation 'org.apache.commons:commons-lang3:3.8.1' // utils
|
|
|
|
implementation 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final' // @Entity class needed
|
|
implementation 'jakarta.persistence:jakarta.persistence-api:3.1.0' // jakarta @Entity
|
|
|
|
implementation 'org.reflections:reflections:0.9.11' // read classes
|
|
implementation 'org.freemarker:freemarker:2.3.23'// write classes
|
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.26' // autogenerate setter getter etc
|
|
compileOnly gradleApi() // gradle plugin
|
|
|
|
annotationProcessor "org.mapstruct:mapstruct-processor:1.3.1.Final"
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.26'
|
|
|
|
testImplementation 'junit:junit:4.12'
|
|
}
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
simplePlugin {
|
|
id = 'gae.piaz.layer3gen'
|
|
displayName = 'Layer 3 Gen'
|
|
description = 'Generates Spring standard 3 layer classes (Controller, Service, Repository) starting from JPA entities'
|
|
implementationClass = 'gae.piaz.layer3gen.gradle.Layer3GenPlugin'
|
|
}
|
|
}
|
|
}
|
|
|
|
pluginBundle {
|
|
website = 'https://github.com/GaetanoPiazzolla/springboot-3layer-generator'
|
|
vcsUrl = 'https://github.com/GaetanoPiazzolla/springboot-3layer-generator'
|
|
tags = ['jpa', 'code-generation', 'spring', 'spring-data']
|
|
}
|
|
|
|
application {
|
|
mainClass = 'gae.piaz.layer3gen.main.Layer3GenMain'
|
|
}
|
|
|
|
distZip {
|
|
into(project.name + '-' + project.version + '/bin') {
|
|
from './conf'
|
|
include '*'
|
|
}
|
|
exclude 'gradle-api-6.6.1.jar'
|
|
}
|
|
|
|
installDist {
|
|
into('bin') {
|
|
from './conf'
|
|
include '*'
|
|
}
|
|
exclude 'gradle-api-6.6.1.jar'
|
|
}
|
|
|
|
spotless {
|
|
java {
|
|
importOrder()
|
|
removeUnusedImports()
|
|
cleanthat()
|
|
googleJavaFormat()
|
|
formatAnnotations()
|
|
}
|
|
}
|