Skip to content

Commit 5bf6416

Browse files
committed
Refactoring build scripts
1 parent 19c0917 commit 5bf6416

File tree

7 files changed

+62
-200
lines changed

7 files changed

+62
-200
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Violation Comments to Bitbucket Server Lib [![Build Status](https://travis-ci.org/tomasbjerre/violation-comments-to-bitbucket-server-lib.svg?branch=master)](https://travis-ci.org/tomasbjerre/violation-comments-to-bitbucket-server-lib) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/se.bjurr.violations/violation-comments-to-bitbucket-server-lib/badge.svg)](https://maven-badges.herokuapp.com/maven-central/se.bjurr.violations/violation-comments-to-bitbucket-server-lib)
1+
# Violation Comments to Bitbucket Server Lib [![Build Status](https://travis-ci.org/tomasbjerre/violation-comments-to-bitbucket-server-lib.svg?branch=master)](https://travis-ci.org/tomasbjerre/violation-comments-to-bitbucket-server-lib) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/se.bjurr.violations/violation-comments-to-bitbucket-server-lib/badge.svg)](https://maven-badges.herokuapp.com/maven-central/se.bjurr.violations/violation-comments-to-bitbucket-server-lib) [ ![Bintray](https://api.bintray.com/packages/tomasbjerre/tomasbjerre/se.bjurr.violations%3Aviolation-comments-to-bitbucket-server-lib/images/download.svg) ](https://bintray.com/tomasbjerre/tomasbjerre/se.bjurr.violations%3Aviolation-comments-to-bitbucket-server-lib/_latestVersion)
22

33
This is a library that adds violation comments from static code analysis to Bitbucket Server.
44

build.gradle

Lines changed: 14 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,30 @@
1+
apply plugin: 'java'
2+
3+
project.ext.tags = ['violation', 'static code analysis', 'Checkstyle', 'CPPLint', 'CPPCheck', 'CSSLint', 'Findbugs', 'Flake8', 'PyLint', 'Pep8', 'Mccabe', 'PyFlakes', 'JSHint', 'Lint', 'PerlCritic', 'PMD', 'ReSharper', 'XMLLint']
4+
group = 'se.bjurr.violations'
5+
description = 'Library that adds violation comments from static code analysis to Bitbucket Server.'
6+
7+
18
buildscript {
29
repositories {
3-
jcenter()
4-
maven {
5-
url "https://plugins.gradle.org/m2/"
6-
}
10+
maven { url "https://jitpack.io" }
711
}
812
dependencies {
9-
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
10-
classpath 'net.researchgate:gradle-release:2.2.2'
11-
classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.36"
12-
classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.6'
13+
classpath 'com.github.tomasbjerre:gradle-scripts:master-SNAPSHOT'
1314
}
1415
}
16+
apply from: project.buildscript.classLoader.getResource('java.gradle').toURI()
17+
apply from: project.buildscript.classLoader.getResource('changelog.gradle').toURI()
18+
apply from: project.buildscript.classLoader.getResource('release.gradle').toURI()
1519

16-
apply plugin: 'java'
17-
apply plugin: 'maven'
18-
apply plugin: 'eclipse'
19-
apply plugin: 'signing'
20-
apply plugin: 'com.bmuschko.nexus'
21-
apply plugin: 'net.researchgate.release'
22-
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
23-
apply plugin: 'com.github.sherter.google-java-format'
24-
25-
task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
26-
filePath = "CHANGELOG.md";
27-
templateContent = """
28-
# Changelog
29-
{{#tags}}
30-
## {{name}}
31-
{{#issues}}
32-
{{#hasIssue}}
33-
{{#hasLink}}
34-
### {{name}} [{{issue}}]({{link}}) {{title}}
35-
{{/hasLink}}
36-
{{^hasLink}}
37-
### {{name}} {{issue}} {{title}}
38-
{{/hasLink}}
39-
{{/hasIssue}}
40-
{{^hasIssue}}
41-
### {{name}}
42-
{{/hasIssue}}
43-
44-
{{#commits}}
45-
**{{{messageTitle}}}**
46-
47-
{{#messageBodyItems}}
48-
* {{.}}
49-
{{/messageBodyItems}}
50-
51-
[{{hash}}](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/{{hash}}) {{authorName}} *{{commitTime}}*
52-
53-
{{/commits}}
54-
55-
{{/issues}}
56-
{{/tags}}
57-
""";
58-
removeIssueFromMessage = true
59-
}
60-
61-
group = 'se.bjurr.violations'
62-
63-
sourceCompatibility = 1.7
64-
targetCompatibility = 1.7
65-
66-
repositories {
67-
jcenter()
68-
mavenLocal()
69-
mavenCentral()
70-
}
7120

7221
dependencies {
73-
compile 'se.bjurr.violations:violation-comments-lib:1.44'
22+
compile 'se.bjurr.violations:violation-comments-lib:1.45'
7423
compile 'com.jayway.jsonpath:json-path:2.0.0'
7524
compile 'com.google.code.gson:gson:2.8.0'
7625
compile 'com.google.guava:guava:20.0'
7726

7827
testCompile 'junit:junit:4.12'
7928
testCompile 'org.assertj:assertj-core:2.3.0'
8029
testCompile ('org.assertj:assertj-core:2.5.0')
81-
}
82-
83-
eclipse {
84-
classpath {
85-
downloadSources = true
86-
downloadJavadoc = true
87-
}
88-
}
89-
90-
sourceSets {
91-
main.java.srcDirs = ['src/main/java' ]
92-
test.java.srcDirs = ['src/test/java' ]
93-
}
94-
95-
if (JavaVersion.current().isJava8Compatible()) {
96-
allprojects {
97-
tasks.withType(Javadoc) {
98-
options.addStringOption('Xdoclint:none', '-quiet')
99-
}
100-
}
101-
}
102-
103-
modifyPom {
104-
project {
105-
name 'Violation Comments to Bitbucket Server Lib'
106-
description 'Library that adds violation comments from static code analysis to Bitbucket Server.'
107-
url 'https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib'
108-
inceptionYear '2016'
109-
scm {
110-
url 'https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib'
111-
connection 'scm:https://tomasbjerre@github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib.git'
112-
developerConnection 'scm:git://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib.git'
113-
}
114-
115-
licenses {
116-
license {
117-
name 'The Apache Software License, Version 2.0'
118-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
119-
distribution 'repo'
120-
}
121-
}
122-
123-
developers {
124-
developer {
125-
id 'tomasbjerre'
126-
name 'Tomas Bjerre'
127-
email 'tomas.bjerre85@gmail.com'
128-
}
129-
}
130-
}
131-
}
132-
133-
extraArchive {
134-
sources = true
135-
tests = true
136-
javadoc = true
137-
}
138-
139-
compileJava.dependsOn 'googleJavaFormat'
140-
141-
afterReleaseBuild.dependsOn {
142-
[install, uploadArchives]
143-
}
30+
}

changelog.mustache

Lines changed: 0 additions & 30 deletions
This file was deleted.

gradle/wrapper/gradle-wrapper.jar

1.07 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sun Oct 18 08:40:15 CEST 2015
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip

gradlew

Lines changed: 42 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 4 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)