forked from bancolombia/scaffold-clean-architecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
121 lines (102 loc) · 3.75 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Gradle plugin project to get you started.
* For more details take a look at the Writing Custom Plugins chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.6.3/userguide/custom_plugins.html
*/
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
}
}
plugins {
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
id 'java-gradle-plugin'
id 'jacoco'
id 'idea'
id 'com.gradle.plugin-publish' version '0.11.0'
id "org.sonarqube" version "3.0"
id 'maven-publish'
}
group 'co.com.bancolombia.cleanArchitecture'
version System.getProperty('version')
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
jcenter()
}
dependencies {
compile 'com.github.spullara.mustache.java:compiler:0.9.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.11.0'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.0'
compile 'commons-io:commons-io:2.7'
compile gradleApi()
// Use JUnit test framework for unit tests
testCompile "org.mockito:mockito-core:2.9.0"
testImplementation 'junit:junit:4.12'
testImplementation gradleTestKit()
compileOnly 'org.projectlombok:lombok:1.18.10'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
}
gradlePlugin {
// Define the plugin
plugins {
cleanArchitecture {
id = 'co.com.bancolombia.cleanArchitecture'
displayName = 'Scaffold Clean Architecture Bancolombia'
description = 'Gradle plugin to create a clean application in Java that already works, It follows our best practices!'
implementationClass = 'co.com.bancolombia.PluginClean'
}
}
}
// Add a source set for the functional test suite
sourceSets {
functionalTest {
}
}
gradlePlugin.testSourceSets(sourceSets.functionalTest)
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
// Add a task to run the functional tests
task functionalTest(type: Test) {
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
}
check {
// Run the functional tests as part of `check`
dependsOn(tasks.functionalTest)
}
pluginBundle {
website = 'https://github.com/bancolombia/scaffold-clean-architecture'
vcsUrl = 'https://github.com/bancolombia/scaffold-clean-architecture'
tags = ['gradle', 'plugin', 'scaffold', 'cleanArchitecture', 'Bancolombia', 'OpenSource']
}
jacocoTestReport {
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled true
csv.enabled false
}
}
sonarqube {
properties {
property "sonar.organization", "grupo-bancolombia"
property "sonar.projectKey", "bancolombia_scaffold-clean-architecture"
property "sonar.host.url", "https://sonarcloud.io/"
property "sonar.sources", "."
property "sonar.java.binaries", "build/classes"
property "sonar.junit.reportPaths", "build/test-results/test"
property "sonar.java-coveragePlugin", "jacoco"
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/report.xml"
property "sonar.test", "src/test/java"
property "sonar.exclusions", ".github/**,src/functionalTest/**,src/test/**/*Test.java,**/**models**,src/test/**/*Provider.java,**/**exceptions**"
property "sonar.sourceEncoding", "UTF-8"
}
}