-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (89 loc) · 2.21 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
// Copyright (c) 2019 Gonzalo Müller Bravo.
// Licensed under the MIT License (MIT), see LICENSE.txt
plugins {
id 'all.shared.gradle.code-common-tasks' version '1.0.1'
id 'all.shared.gradle.project-style-checker' version '1.0.2'
id 'com.github.ksoichiro.console.reporter' version '0.6.2'
id 'com.gradle.plugin-publish' version '0.10.0'
id 'groovy'
id 'jacoco'
}
repositories {
jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven {
url 'https://dl.bintray.com/gmullerb/all.shared.gradle'
}
}
dependencies {
compile gradleApi()
compile 'gradle.plugin.all.shared.gradle.file-lister:file-lister:+'
testCompile 'all.shared.gradle:spy-project-factory:+'
testCompile 'pl.pojo:pojo-tester:+'
testCompile 'org.junit.jupiter:junit-jupiter-api:+'
testCompile 'org.mockito:mockito-core:+'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:+'
}
// Plugin settings
//////////////////
pluginBundle {
website = 'https://gitlab.com/gmullerb/qrc-file-generator/'
vcsUrl = 'https://github.com/gmullerb/qrc-file-generator/'
description = 'QRC File Generator for QML Projects.'
tags = ['qrc file', 'qrc generator', 'qrc file generator', 'qml project', 'qrc', 'qml', 'qt', 'qt quick']
plugins {
thePlugin {
id = project.hasProperty('PLUGIN_ID')
? property('PLUGIN_ID')
: 'Set plugin id'
displayName = 'Qrc File Generator plugin'
}
}
}
consoleReporter {
jacoco {
autoconfigureCoverageConfig false
}
}
// Task settings
////////////////
test {
useJUnitPlatform()
finalizedBy reportCoverage
}
jacocoTestReport {
reports {
xml.enabled true
}
}
jacocoTestCoverageVerification {
// jacocoTestCoverageVerification task settings
violationRules {
rule {
element = 'BUNDLE'
limit {
counter = 'BRANCH'
value = 'COVEREDRATIO'
minimum = 0.925
}
}
rule {
element = 'BUNDLE'
limit {
counter = 'INSTRUCTION'
value = 'COVEREDRATIO'
minimum = 0.875
}
}
}
// gradle task settings
shouldRunAfter jacocoTestReport
}
reportCoverage {
dependsOn jacocoTestReport
}
// Default task
///////////////
defaultTasks 'assessCommon', 'assessGradle', 'build'