Skip to content

Commit 5e59bcf

Browse files
authored
1.x: no need to run gradle assembe by travis (ReactiveX#4183)
* 1.x: no need to run gradle assembe by travis * Also update the sh with the parameter * +git fsck * full check * limit clone depth * Limit memory even further * disable PMD
1 parent e267e02 commit 5e59bcf

File tree

3 files changed

+45
-37
lines changed

3 files changed

+45
-37
lines changed

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ jdk:
44
sudo: false
55
# as per http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
66

7+
git:
8+
depth: 10
9+
10+
# prevent travis running gradle assemble; let the build script do it anyway
11+
install: true
12+
713
# script for build and release via Travis to Bintray
814
script: gradle/buildViaTravis.sh
915

build.gradle

+35-35
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111
description = 'RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.'
1212

1313
apply plugin: 'java'
14-
apply plugin: 'pmd'
14+
//apply plugin: 'pmd'
1515
apply plugin: 'findbugs'
1616
apply plugin: 'jacoco'
1717
apply plugin: 'ru.vyarus.animalsniffer'
@@ -61,7 +61,7 @@ if (project.hasProperty('release.useLastTag')) {
6161
}
6262

6363
test{
64-
maxHeapSize = "1500m"
64+
maxHeapSize = "1200m"
6565
}
6666

6767
license {
@@ -81,40 +81,40 @@ jacocoTestReport {
8181

8282
build.dependsOn jacocoTestReport
8383

84-
pmd {
85-
toolVersion = '5.4.2'
86-
ignoreFailures = true
87-
sourceSets = [sourceSets.main]
88-
ruleSets = []
89-
ruleSetFiles = files('pmd.xml')
90-
91-
}
92-
93-
pmdMain {
94-
reports {
95-
html.enabled = true
96-
xml.enabled = true
97-
}
98-
}
99-
100-
task pmdPrint(dependsOn: 'pmdMain') << {
101-
File file = new File('build/reports/pmd/main.xml')
102-
if (file.exists()) {
103-
104-
println("Listing first 100 PMD violations")
105-
106-
file.eachLine { line, count ->
107-
if (count <= 100) {
108-
println(line)
109-
}
110-
}
111-
112-
} else {
113-
println("PMD file not found.")
114-
}
115-
}
11684

117-
build.dependsOn pmdPrint
85+
//pmd {
86+
// toolVersion = '5.4.2'
87+
// ignoreFailures = true
88+
// sourceSets = [sourceSets.main]
89+
// ruleSets = []
90+
// ruleSetFiles = files('pmd.xml')
91+
//}
92+
93+
//pmdMain {
94+
// reports {
95+
// html.enabled = true
96+
// xml.enabled = true
97+
// }
98+
//}
99+
100+
//task pmdPrint(dependsOn: 'pmdMain') << {
101+
// File file = new File('build/reports/pmd/main.xml')
102+
// if (file.exists()) {
103+
//
104+
// println("Listing first 100 PMD violations")
105+
//
106+
// file.eachLine { line, count ->
107+
// if (count <= 100) {
108+
// println(line)
109+
// }
110+
// }
111+
//
112+
// } else {
113+
// println("PMD file not found.")
114+
// }
115+
//}
116+
117+
//build.dependsOn pmdPrint
118118

119119
animalsniffer {
120120
annotation = 'rx.internal.util.SuppressAnimalSniffer'

gradle/buildViaTravis.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
22
# This script will build the project.
33

4+
git fsck --full
5+
46
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
57
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
6-
./gradlew -Prelease.useLastTag=true build
8+
./gradlew -Prelease.useLastTag=true build --stacktrace
79
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
810
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
911
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot --stacktrace
@@ -12,5 +14,5 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
1214
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final --stacktrace
1315
else
1416
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
15-
./gradlew -Prelease.useLastTag=true build
17+
./gradlew -Prelease.useLastTag=true build --stacktrace
1618
fi

0 commit comments

Comments
 (0)