1+ buildscript {
2+ repositories {
3+ maven { url ' http://mvnrepository.com' }
4+ mavenCentral()
5+ jcenter()
6+ }
7+ dependencies {
8+ classpath ' com.google.protobuf:protobuf-gradle-plugin:0.8.3'
9+ classpath ' com.github.jengelman.gradle.plugins:shadow:2.0.2'
10+ }
11+ }
12+ plugins {
13+ id " org.sonarqube" version " 2.6"
14+ }
15+
116group ' org.tron'
217version ' 1.0.0'
318
@@ -8,7 +23,6 @@ apply plugin: 'checkstyle'
823apply plugin : ' com.github.johnrengelman.shadow'
924apply plugin : " jacoco"
1025
11-
1226sourceCompatibility = 1.8
1327[compileJava, compileTestJava]* . options* . encoding = ' UTF-8'
1428mainClassName = ' org.tron.program.FullNode'
@@ -18,19 +32,6 @@ repositories {
1832 mavenLocal()
1933 mavenCentral()
2034}
21-
22- buildscript {
23- repositories {
24- maven { url ' http://mvnrepository.com' }
25- mavenCentral()
26- jcenter()
27- }
28- dependencies {
29- classpath ' com.google.protobuf:protobuf-gradle-plugin:0.8.3'
30- classpath ' com.github.jengelman.gradle.plugins:shadow:2.0.2'
31- }
32- }
33-
3435def versions = [
3536 checkstyle : ' 8.7' ,
3637]
@@ -143,17 +144,15 @@ checkstyle {
143144}
144145
145146checkstyleMain {
146- source ' src'
147- include ' **/*.java'
148- exclude ' **/gen/**'
147+ source = ' src/main/java'
149148}
150149
151150task lint (type : Checkstyle ) {
152151 // Cleaning the old log because of the creation of the new ones (not sure if totaly needed)
153152 delete fileTree(dir : " ${ project.rootDir} /app/build/reports" )
154153 source ' src'
155154 include ' **/*.java'
156- exclude ' ** /gen/**'
155+ exclude ' main /gen/**'
157156 // empty classpath
158157 classpath = files()
159158 // Failing the build
@@ -186,6 +185,7 @@ protobuf {
186185 protoc {
187186 artifact = " com.google.protobuf:protoc:3.5.1-1"
188187 }
188+
189189 plugins {
190190 grpc {
191191 artifact = ' io.grpc:protoc-gen-grpc-java:1.9.0'
@@ -236,9 +236,9 @@ jacocoTestReport {
236236 }
237237}
238238
239- task stest (type :Test ){
240- useTestNG{
241- suites( file(' src/test/resources/testng.xml' ) )
239+ task stest (type : Test ) {
240+ useTestNG {
241+ suites(file(' src/test/resources/testng.xml' ))
242242 }
243243
244244 testLogging {
@@ -247,7 +247,7 @@ task stest(type:Test){
247247 }
248248}
249249
250- def binaryRelease (taskName ,jarName ,mainClass ) {
250+ def binaryRelease (taskName , jarName , mainClass ) {
251251 return tasks. create(" ${ taskName} " , Jar ) {
252252 baseName = jarName
253253 version = null
@@ -267,7 +267,8 @@ def binaryRelease(taskName,jarName,mainClass) {
267267 }
268268}
269269
270+
270271artifacts {
271- archives(binaryRelease(' buildSolidityNodeJar' ,' SolidityNode' ,' org.tron.program.SolidityNode' ),
272- binaryRelease(' buildFullNodeJar' ,' FullNode' ,' org.tron.program.FullNode' ))
272+ archives(binaryRelease(' buildSolidityNodeJar' , ' SolidityNode' , ' org.tron.program.SolidityNode' ),
273+ binaryRelease(' buildFullNodeJar' , ' FullNode' , ' org.tron.program.FullNode' ))
273274}
0 commit comments