-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.3.3
132 lines (116 loc) · 3.5 KB
/
build.gradle.3.3
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
122
123
124
125
126
127
128
129
130
131
132
apply plugin: 'java'
apply plugin: 'org.sonarqube'
apply plugin: 'jacoco'
apply plugin: 'eclipse'
apply plugin: 'maven'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
//./gradlew sonarqube
//./gradlew sonarqube -x test
sonarqube {
properties {
property "sonar.projectName", "Java :: Abilists Project :: Abilists Core"
property "sonar.projectKey", "$project.group:$project.name"
property "sonar.language", "java"
property "sonar.sources", "src"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.junit.reportsPath", "${project.buildDir}/test-results"
property "sonar.jacoco.reportPath", "${project.buildDir}/jacoco/test.exec"
}
}
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.ajoberstar:gradle-jacoco:0.1.0'
classpath 'org.sonarqube.gradle:gradle-sonarqube-plugin:1.0'
}
}
version = 'DEV0.1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Abilists', 'Implementation-Version': version
}
}
repositories {
mavenLocal()
mavenCentral()
}
// For provided jars
configurations {
provided
}
ext {
springVersion = '4.3.28.RELEASE'
springSecrityVersion = '4.2.6.RELEASE'
atomikosVersion = '4.0.6'
logbackVersion = '1.1.3'
}
dependencies {
compile "org.slf4j:slf4j-api:1.7.12"
runtime "org.slf4j:jcl-over-slf4j:1.7.12"
compile 'ch.qos.logback:logback-core:' + logbackVersion
compile 'ch.qos.logback:logback-classic:' + logbackVersion
compile "org.mybatis:mybatis:3.2.8"
compile "org.mybatis:mybatis-spring:1.2.5"
compile ('org.springmodules:spring-modules-jakarta-commons:0.8') {
exclude group: 'commons-chain', module: 'commons-chain'
}
compile 'org.springframework:spring-jdbc:' + springVersion
compile 'org.springframework:spring-webmvc:' + springVersion
compile 'org.springframework:spring-context:' + springVersion
compile "org.apache.tomcat:tomcat-servlet-api:8.5.5"
compile "io.base:base-core:0.2.3"
testCompile 'javax.servlet:javax.servlet-api:4.0.1'
testCompile "junit:junit:4.12"
}
jar {
manifest {
attributes (
'Specification-Title': 'abilists_plugins.jar',
'Specification-Version': version,
'Specification-Vendor': 'Softfran Tech, Inc.',
'Built-By': System.properties['user.name'],
'Build-Timestamp': new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Created-By': "Gradle ${gradle.gradleVersion}",
'Build-Jdk': "${System.properties['java.version']}",
'Implementation-Title': 'abilists plugins',
'Implementation-Version': version,
'Class-Path': configurations.runtime.files.collect { 'libs/' + it.name }.join(' ')
)
}
}
// $ gradle install
configure(install.repositories.mavenInstaller) {
pom.project {
group = 'com.abilists'
artifactId 'abilists_plugins'
inceptionYear '2019'
packaging 'jar'
licenses {
license {
name 'Eclipse Public License (Version 1.0)'
url 'http://www.eclipse.org/legal/epl-v10.html'
distribution 'repo'
}
}
}
}
// $ gradle -b ./devbuild.gradle buildJar
// $ gradle buildJar
task buildJar << {
copy {
from "build/libs/abilists_plugins-" + version + ".jar"
into "${System.getProperty( 'user.dir' )}" + "/../plugin_sample/libs"
include '**/*.jar'
}
}
buildJar.dependsOn(install)
// $ gradle wrapper
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}