|
| 1 | +buildscript { |
| 2 | +ext { |
| 3 | +grailsVersion = project.grailsVersion |
| 4 | +} |
| 5 | +repositories { |
| 6 | +mavenLocal() |
| 7 | +maven { url "https://repo.grails.org/grails/core" } |
| 8 | +maven { url 'https://repo.spring.io/libs-snapshot' } |
| 9 | +} |
| 10 | +dependencies { |
| 11 | +classpath "org.grails:grails-gradle-plugin:$grailsVersion" |
| 12 | +classpath "org.grails.plugins:hibernate:4.3.10.5" |
| 13 | +classpath 'org.ajoberstar:gradle-git:1.1.0' |
| 14 | +} |
| 15 | +} |
| 16 | + |
| 17 | +plugins { |
| 18 | +id "io.spring.dependency-management" version "0.5.4.RELEASE" |
| 19 | +id 'org.asciidoctor.convert' version '1.5.3' |
| 20 | +} |
| 21 | + |
| 22 | +version "0.1" |
| 23 | +group "com.example" |
| 24 | + |
| 25 | +apply plugin: "spring-boot" |
| 26 | +apply plugin: "war" |
| 27 | +apply plugin: 'eclipse' |
| 28 | +apply plugin: 'idea' |
| 29 | +apply plugin: "org.grails.grails-web" |
| 30 | + |
| 31 | +ext { |
| 32 | +grailsVersion = project.grailsVersion |
| 33 | +gradleWrapperVersion = project.gradleWrapperVersion |
| 34 | +restDocsVersion = "1.1.0.BUILD-SNAPSHOT" |
| 35 | +snippetsDir = file('src/docs/generated-snippets') |
| 36 | +} |
| 37 | + |
| 38 | +repositories { |
| 39 | +mavenLocal() |
| 40 | +maven { url 'https://repo.spring.io/libs-snapshot' } |
| 41 | +maven { url "https://repo.grails.org/grails/core" } |
| 42 | +} |
| 43 | + |
| 44 | +dependencyManagement { |
| 45 | +dependencies { |
| 46 | +dependency "org.springframework.restdocs:spring-restdocs-restassured:$restDocsVersion" |
| 47 | +} |
| 48 | +imports { |
| 49 | +mavenBom "org.grails:grails-bom:$grailsVersion" |
| 50 | +} |
| 51 | +applyMavenExclusions false |
| 52 | +} |
| 53 | + |
| 54 | +dependencies { |
| 55 | +compile "org.springframework.boot:spring-boot-starter-logging" |
| 56 | +compile "org.springframework.boot:spring-boot-starter-actuator" |
| 57 | +compile "org.springframework.boot:spring-boot-autoconfigure" |
| 58 | +compile "org.springframework.boot:spring-boot-starter-tomcat" |
| 59 | +compile "org.grails:grails-plugin-url-mappings" |
| 60 | +compile "org.grails:grails-plugin-rest" |
| 61 | +compile "org.grails:grails-plugin-interceptors" |
| 62 | +compile "org.grails:grails-plugin-services" |
| 63 | +compile "org.grails:grails-plugin-datasource" |
| 64 | +compile "org.grails:grails-plugin-databinding" |
| 65 | +compile "org.grails:grails-plugin-async" |
| 66 | +compile "org.grails:grails-web-boot" |
| 67 | +compile "org.grails:grails-logging" |
| 68 | + |
| 69 | +compile "org.grails.plugins:hibernate" |
| 70 | +compile "org.grails.plugins:cache" |
| 71 | +compile "org.hibernate:hibernate-ehcache" |
| 72 | + |
| 73 | +runtime "com.h2database:h2" |
| 74 | + |
| 75 | +testCompile "org.grails:grails-plugin-testing" |
| 76 | +testCompile "org.grails.plugins:geb" |
| 77 | +testCompile 'org.springframework.restdocs:spring-restdocs-restassured' |
| 78 | + |
| 79 | +console "org.grails:grails-console" |
| 80 | +} |
| 81 | + |
| 82 | +task wrapper(type: Wrapper) { |
| 83 | +gradleVersion = gradleWrapperVersion |
| 84 | +} |
| 85 | + |
| 86 | +ext { |
| 87 | +snippetsDir = file('src/docs/generated-snippets') |
| 88 | +} |
| 89 | + |
| 90 | +task cleanTempDirs(type: Delete) { |
| 91 | +delete fileTree(dir: 'src/docs/generated-snippets') |
| 92 | +} |
| 93 | + |
| 94 | +test { |
| 95 | +dependsOn cleanTempDirs |
| 96 | +outputs.dir snippetsDir |
| 97 | +} |
| 98 | + |
| 99 | +asciidoctor { |
| 100 | +dependsOn integrationTest |
| 101 | +inputs.dir snippetsDir |
| 102 | +sourceDir = file('src/docs') |
| 103 | +separateOutputDirs = false |
| 104 | +attributes 'snippets': snippetsDir |
| 105 | +} |
| 106 | + |
| 107 | +build.dependsOn asciidoctor |
0 commit comments