Skip to content

Commit

Permalink
add sonarcloud support.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohong committed May 25, 2018
1 parent 1774fb6 commit dbce1b3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 25 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ script:
- sh tron.sh
- ./gradlew lint
- ./gradlew test
# other script steps might be done before running the actual analysis
- sonar-scanner


addons:
ssh_known_hosts:
- 47.93.9.236:22008
sonarcloud:
organization: "tron" # the key of the org you chose at step #3
token:
secure: "DXtn8yjb2rs1dLgiSOT2w5DhskYriC252vOkeS5ydFNkfrwVFpZyGGzqJlBMhuD2MJvOb30bxUZmZC0EA3cw6BjZb4kkDrsga1HjaF2uPDFKyItTehz/BpTW4kurY4qREuxnhjw32GTdt/6n2t+93HabCIvyhNc7IZJpqCldND0VH3VNWAwRPNVnfz5uPxk0tGCHxYYk1+jKplhqiygiMSQyYqkrLiCUCxtZPoke7r2zi/WSvVhoGByF2u4rGPs6/vLWok4uxb2jd+ITOjppdKdXeqMUeJJgT/6QR4lTHuytwodTINfEQWG3D+W5oo3BVqzEBAQQDZPAxErWsX64xrAdfkX0oihw5DoU7MQFbRIamMAfO/1i7dId1aR4WrgyM7V/Qxp+JlqV6J2b0MVDq5L6jqjVBHzHgzZWs3ww+fx+4HqQYEyT2D/Ld492qX4HjkZw7HpJFY+xS4wWpN3BoGjnPNVW8d0CT/P9/WIgocCR8Sz2hCkBvSXvfp23K2Z1fhTBYNKrK+2wQ3+cCdn2AYbGCqP1vWpl3Cys4LmorVusjNM0QxUauIs55iG5+cPRLy69JYJZ6wEAfZTLSOtx5bhe3aQkBfzX9h0HX+UOe3DX4LQt5Y3mnolTrJNGCSBE+Q1v5GynJk3a3d9RA9PY2k0jLxHum9OfH2A3RZi0NgA="
skip_build:
- README.md:
- LICENSE
Expand All @@ -20,3 +28,7 @@ after_deploy:
- ./gradlew stest






44 changes: 23 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
buildscript {
repositories {
maven { url 'http://mvnrepository.com' }
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
}
}
plugins {
id "org.sonarqube" version "2.6"
}
group 'org.tron'
version '1.0.0'

Expand All @@ -7,8 +21,7 @@ apply plugin: 'application'
apply plugin: 'checkstyle'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "jacoco"


apply plugin: "org.sonarqube"
sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
mainClassName = 'org.tron.program.FullNode'
Expand All @@ -18,19 +31,6 @@ repositories {
mavenLocal()
mavenCentral()
}

buildscript {
repositories {
maven { url 'http://mvnrepository.com' }
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
}
}

def versions = [
checkstyle: '8.7',
]
Expand Down Expand Up @@ -186,6 +186,7 @@ protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.5.1-1"
}

plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.9.0'
Expand Down Expand Up @@ -236,9 +237,9 @@ jacocoTestReport {
}
}

task stest(type:Test){
useTestNG{
suites( file('src/test/resources/testng.xml') )
task stest(type: Test) {
useTestNG {
suites(file('src/test/resources/testng.xml'))
}

testLogging {
Expand All @@ -247,7 +248,7 @@ task stest(type:Test){
}
}

def binaryRelease(taskName,jarName,mainClass) {
def binaryRelease(taskName, jarName, mainClass) {
return tasks.create("${taskName}", Jar) {
baseName = jarName
version = null
Expand All @@ -267,7 +268,8 @@ def binaryRelease(taskName,jarName,mainClass) {
}
}


artifacts {
archives(binaryRelease('buildSolidityNodeJar','SolidityNode','org.tron.program.SolidityNode'),
binaryRelease('buildFullNodeJar','FullNode','org.tron.program.FullNode'))
archives(binaryRelease('buildSolidityNodeJar', 'SolidityNode', 'org.tron.program.SolidityNode'),
binaryRelease('buildFullNodeJar', 'FullNode', 'org.tron.program.FullNode'))
}
4 changes: 0 additions & 4 deletions src/main/java/org/tron/core/db/TransactionStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ public long getTotalTransactions() {

private static TransactionStore instance;

public static void destory() {
instance = null;
}

public static void destroy() {
instance = null;
}
Expand Down

0 comments on commit dbce1b3

Please sign in to comment.