-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (99 loc) · 3.62 KB
/
build.gradle
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
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
plugins {
id 'java'
id 'scala' // maybe helping
// check always for updates https://github.com/JetBrains/gradle-intellij-plugin/releases
id 'org.jetbrains.intellij' version '0.7.2'
id 'org.openjfx.javafxplugin' version '0.0.9'
id 'org.jetbrains.changelog' version "1.1.2"
id 'checkstyle'
id 'pmd'
id "com.github.spotbugs" version "4.7.0"
id 'com.github.sherter.google-java-format' version '0.8'
id 'com.github.johnrengelman.shadow' version '6.1.0'
}
group 'opalj'
version '1.0.9'
sourceCompatibility = 11
targetCompatibility = 11
repositories {
//mavenLocal()
mavenCentral()
jcenter()
maven { url = 'https://mvnrepository.com/artifact/de.opal-project/'} //opal stable
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' } // opal snapshot
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
implementation group: 'de.opal-project', name: 'abstract-interpretation-framework_2.12', version: '4.0.0'
implementation group: 'de.opal-project', name:'bytecode-disassembler_2.12', version: '4.0.0'
implementation group: 'de.opal-project', name: 'bytecode-representation_2.12', version: '4.0.0'
implementation group: 'de.opal-project', name: 'three-address-code_2.12', version: '4.0.0'
implementation group: 'de.opal-project', name: 'common_2.12', version: '4.0.0'
}
//https://github.com/JetBrains/gradle-intellij-plugin#configuration
intellij {
version = 'IC-2021.1' // IC Community Edition
updateSinceUntilBuild false //Disables updating since-build attribute in plugin.xml
plugins = ['com.intellij.java', 'org.intellij.scala:2021.1.21' , 'PsiViewer:211-SNAPSHOT'] // load the the scala-plugin
pluginName = 'bytecode-disassembler'
}
patchPluginXml {
changeNotes """ new features jars have a open dialog.just rightclick on jar in the project-view."""
}
publishPlugin {
//dependsOn('check')
dependsOn('shadowJar')
// http://www.jetbrains.org/intellij/sdk/docs/plugin_repository/api/plugin_upload.html
username intellijPublishUsername
//password intellijPublishPassword
token intellijPublishToken
//channels 'beta'
distributionFile "build/libs/${intellij.pluginName}-${version}-all.jar"
}
buildSearchableOptions{
enabled = false
}
// ================
// Overriding tasks
// ================
// build.dependsOn(check), which means that 'check' will be executed whenever 'build' will be executed
check {
// googleJavaFormat will report "NO-SOURCE" if everything is properly formatted (-> not harmful in any way, can ignore)
dependsOn 'googleJavaFormat'
// dependsOn [checkstyle, pmd and spotbugsMain] per default
tasks.findByName('checkstyleMain').mustRunAfter('googleJavaFormat')
tasks.findByName('pmdMain').mustRunAfter('checkstyleMain')
tasks.findByName('spotbugsMain').mustRunAfter('pmdMain')
}
javafx {
version = "16"
modules = [ 'javafx.web', 'javafx.graphics', 'javafx.swing' ]
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
spotbugs {
ignoreFailures = true
extraArgs = ['-html:fancy-hist.xsl']
}
checkstyle {
toolVersion "8.10.1"
config = rootProject.resources.text.fromFile('config/checkstyle/checkstyle.xml')
// maxErrors 20
}
pmd {
toolVersion = "6.32.0"
ignoreFailures = true
ruleSetFiles = files("config/pmd/myRuleSets.xml")
}
runIde {
maxHeapSize = "4g"
}
shadowJar {
transform(AppendingTransformer) {
resource = 'reference.conf'
}
}