1
1
buildscript {
2
- project. ext. CERN_VM = System . getProperty(' CERN_TECHNET_VM' ) ?: System . getenv(' CERN_TECHNET_VM' ) ?: false
3
- project. ext. TRAVIS_CI = System . getProperty(' TRAVIS' ) ?: System . getenv(' TRAVIS' ) ?: false
4
- project. ext. DEPLOYMENT = System . getProperty(' deployment' ) ?: false
5
- project. ext. VCS_TAG = System . getProperty(' TRAVIS_TAG' ) ?: System . getenv(' TRAVIS_TAG' )
6
- project. ext. POM = [
7
- groupId : ' org.tensorics' ,
8
- artifactId : ' tensorics-core-starter' ,
9
- description : ' Tensorics is a java framework which uses a tensor as a central object. A tensor represents a set of values placed in an N-dimensional space. Wherever you are tempted to use maps of maps, a tensor might be a good choice ;-) Tensorics provides methods to create, transform and performing calculations with those tensors.' ,
10
- developers : [
11
- [
12
- id : ' kaifox' ,
13
- name : ' Kajetan Fuchsberger' ,
14
-
15
- ],
16
- [
17
- id : ' agorzawski' ,
18
- name : ' Arek Gorzawski' ,
19
-
20
- ],
21
- [
22
- id : ' michi42' ,
23
- name : ' Michi Hostettler' ,
24
-
25
- ],
26
- [
27
- id : ' andreacalia' ,
28
- name : ' Andrea Calia' ,
29
-
30
- ]
31
- ]]
32
- project. ext. INFO = [
33
- repo : ' https://github.com/tensorics/tensorics-core-starter.git' ,
34
- url : ' http://tensorics.org/' ,
35
- github : ' https://github.com/tensorics/tensorics-core-starter' ,
36
- githubIssues : ' https://github.com/tensorics/tensorics-core-starter/issues'
37
- ]
38
- project. ext. BINTRAY = [
39
- repo : ' tensorics-repo' ,
40
- name : ' org.tensorics:tensorics-core-starter' ,
41
- organization : ' tensorics' ,
42
- userName : ' tensorics-dev' ,
43
- apiToken : System . getenv(' BINTRAY_API_TOKEN' )
44
- ]
2
+ project. ext[' CERN_VM' ] = System . getProperty(' CERN_TECHNET_VM' ) ?: System . getenv(' CERN_TECHNET_VM' ) ?: project. hasProperty(' CERN_TECHNET_VM' ) ?: false
3
+ project. ext[' DEPLOYMENT' ] = System . getProperty(' DEPLOYMENT' ) ?: false
45
4
46
5
repositories {
47
- if (CERN_VM ) {
48
- maven { url ' http://artifactory.cern.ch/gradle-plugins' }
6
+ if (project[' CERN_VM' ]) {
49
7
maven { url ' http://artifactory.cern.ch/ds-jcenter' }
50
8
maven { url ' http://artifactory.cern.ch/development' }
9
+ maven { url ' http://artifactory.cern.ch/gradle-plugins' }
51
10
} else {
52
- mavenCentral()
53
- jcenter()
11
+ gradlePluginPortal()
54
12
}
55
13
}
14
+
56
15
dependencies {
57
- classpath ' com.netflix.nebula:nebula-publishing-plugin:5.1.0 '
58
- classpath ' com.jfrog.bintray. gradle:gradle-bintray- plugin:1.8.4 '
16
+ classpath ' com.github.jk1:gradle-license-report:1.5 '
17
+ classpath ' io.github. gradle-nexus:publish- plugin:1.0.0 '
59
18
}
60
19
}
61
20
@@ -64,34 +23,28 @@ apply plugin: 'jacoco'
64
23
apply plugin : ' idea'
65
24
apply plugin : ' eclipse'
66
25
26
+ group = project[' POM.groupId' ]
27
+
28
+ sourceCompatibility = JavaVersion . VERSION_1_8
29
+
67
30
repositories {
68
- if (CERN_VM ) {
31
+ if (project[ ' CERN_VM' ] ) {
69
32
maven { url ' http://artifactory.cern.ch/ds-jcenter' }
70
33
maven { url ' http://artifactory.cern.ch/development' }
71
34
} else {
72
35
mavenCentral()
73
- jcenter()
74
36
}
75
37
}
76
38
77
- if (DEPLOYMENT ) {
78
- apply plugin : ' maven'
79
- apply plugin : ' maven-publish'
80
- apply plugin : ' nebula.maven-publish'
81
- apply plugin : ' com.jfrog.bintray'
82
-
83
- println ' Applying deployment scripts'
84
- apply from : ' ./scripts/bintray-deploy.gradle'
39
+ dependencies {
40
+ compile group : ' org.tensorics' , name : ' tensorics-core' , version : tensoricsCoreVersion
41
+ compile (group : ' org.springframework.boot' , name : ' spring-boot-starter' , version : springBootVersion) { exclude module : " spring-boot-starter-logging" }
42
+ testCompile group : ' org.springframework.boot' , name : ' spring-boot-starter-test' , version : springBootVersion
85
43
}
86
44
87
- group ' org.tensorics'
88
-
89
- sourceCompatibility = JavaVersion . VERSION_1_8
90
-
91
- dependencies {
92
- compile ' org.tensorics:tensorics-core:0.+'
93
- compile (group : ' org.springframework.boot' , name : ' spring-boot-starter' , version : ' 2.1.0.RELEASE' ) { exclude module : " spring-boot-starter-logging" }
94
- testCompile group : ' org.springframework.boot' , name : ' spring-boot-starter-test' , version : ' 2.1.0.RELEASE'
45
+ wrapper {
46
+ gradleVersion = ' 5.4.1'
47
+ distributionType = Wrapper.DistributionType . ALL
95
48
}
96
49
97
50
sourceSets {
@@ -101,9 +54,24 @@ sourceSets {
101
54
}
102
55
}
103
56
104
- javadoc { options. encoding = " UTF-8" }
105
57
106
- task wrapper (type : Wrapper ) { gradleVersion = ' 4.8.1' }
58
+ test {
59
+ testLogging {
60
+ events " passed" , " skipped" , " failed"
61
+ exceptionFormat " full"
62
+ }
63
+ }
64
+
65
+ jacocoTestReport {
66
+ reports {
67
+ xml. enabled true
68
+ xml. destination file(" $buildDir /reports/jacoco/report.xml" )
69
+ html. enabled true
70
+ csv. enabled false
71
+ }
72
+ }
73
+
74
+ javadoc { options. encoding = " UTF-8" }
107
75
108
76
if (! project. tasks. findByName(" javadocJar" )) {
109
77
task javadocJar(type : Jar ) {
@@ -119,17 +87,6 @@ if(!project.tasks.findByName("sourcesJar")) {
119
87
}
120
88
}
121
89
122
- artifacts { archives javadocJar, sourcesJar }
123
-
124
- jacocoTestReport {
125
- reports {
126
- xml. enabled true
127
- xml. destination new File (" ${ buildDir} /reports/jacoco/report.xml" )
128
- html. enabled true
129
- csv. enabled false
130
- }
131
- }
132
-
133
90
eclipse {
134
91
classpath {
135
92
downloadJavadoc = true
@@ -143,3 +100,18 @@ idea {
143
100
downloadSources = true
144
101
}
145
102
}
103
+
104
+ if (! project[' CERN_VM' ]) {
105
+ println ' Applying licensing report'
106
+ apply plugin : ' com.github.jk1.dependency-license-report'
107
+
108
+ licenseReport {
109
+ renderers = [this . class. classLoader. loadClass(' com.github.jk1.license.render.InventoryHtmlReportRenderer' ). newInstance()]
110
+ filters = [this . class. classLoader. loadClass(' com.github.jk1.license.filter.LicenseBundleNormalizer' ). newInstance()]
111
+ }
112
+ }
113
+
114
+ if (project[' DEPLOYMENT' ]) {
115
+ println ' Applying deployment scripts'
116
+ apply from : ' https://raw.githubusercontent.com/ossgang/gradle-scripts/master/deployment/deploy-to-maven-central.gradle'
117
+ }
0 commit comments