-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
108 lines (88 loc) · 3.6 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
buildscript {
ext.bintrayUser = project.hasProperty('bintrayUser') ? project.bintrayUser : System.getenv('BINTRAY_USER')
ext.bintrayKey = project.hasProperty('bintrayKey') ? project.bintrayKey : System.getenv('BINTRAY_KEY')
ext.bintrayEnabled = project.bintrayUser && project.bintrayKey
ext.sonatypeUser = project.hasProperty('sonatypeUser') ? project.sonatypeUser : System.getenv('SONATYPE_USER')
ext.sonatypeKey = project.hasProperty('sonatypeKey') ? project.sonatypeKey : System.getenv('SONATYPE_KEY')
ext.mavenCentralSyncEnabled = project.sonatypeUser && project.sonatypeKey
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://repo.spring.io/plugins-release' }
maven { url "https://repo.spring.io/milestone" }
maven { url 'https://repo.spring.io/plugins-release' }
jcenter()
}
dependencies {
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.3'
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.4.13'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31"
classpath "org.jetbrains.kotlin:kotlin-allopen:1.3.31"
}
}
plugins {
id "io.spring.dependency-management" version "1.0.8.RELEASE"
}
apply from: 'properties.gradle'
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.junit.platform.gradle.plugin'
description = 'Structurizr Extensions'
group cbGroup
version cbVersion
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:2.1.7.RELEASE")
}
dependencies {
dependency "com.structurizr:structurizr-core:${ext['structurizr.version']}"
dependency "com.structurizr:structurizr-client:${ext['structurizr.version']}"
dependency "org.junit.jupiter:junit-jupiter-api:${ext['junit.version']}"
dependency "org.junit.jupiter:junit-jupiter-params:${ext['junit.version']}"
dependency "org.junit.jupiter:junit-jupiter-engine:${ext['junit.version']}"
}
}
dependencies {
testCompile 'org.junit.jupiter:junit-jupiter-api'
testCompile 'org.junit.jupiter:junit-jupiter-params'
testRuntime 'org.junit.jupiter:junit-jupiter-engine'
}
repositories {
jcenter()
}
// package sources
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
// package javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
if (bintrayEnabled) {
apply plugin: 'com.jfrog.bintray'
apply from: "$rootProject.projectDir/jcenter.gradle"
apply from: "$rootProject.projectDir/artifactory.gradle"
apply from: "$rootProject.projectDir/maven.gradle"
/* artifactory only for snapshots */
artifactoryPublish.onlyIf {
(version ==~ /.*SNAPSHOT/)
}
/* releases only for bintray */
bintrayUpload.onlyIf {
!(version ==~ /.*SNAPSHOT/)
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.7'
}