-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
169 lines (151 loc) · 5.7 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
plugins {
id 'java'
id 'application'
}
application {
mainClassName = project.hasProperty("mainClass") ? project.getProperty("mainClass") : "benchmark.CmdRunner"
applicationDefaultJvmArgs = ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
}
group 'ca.concordia'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
mavenLocal()
}
def refactoringMinerVersion = project.hasProperty('refactoringMinerVersion') ?
project.refactoringMinerVersion :
'3.0.8-SNAPSHOT'
dependencies {
implementation('com.google.code.gson:gson:2.8.9')
implementation 'org.eclipse.jdt:org.eclipse.jdt.core:3.35.0'
implementation ("com.github.tsantalis:refactoring-miner:$refactoringMinerVersion") {
exclude group: 'org.slf4j', module: 'slf4j-simple'
exclude group: 'org.slf4j', module: 'log4j-over-slf4j'
}
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r'
implementation 'com.github.gumtreediff:core:3.0.0'
implementation 'com.github.gumtreediff:gen.jdt:3.0.0'
implementation 'it.unimi.dsi:fastutil:8.3.1'
implementation 'com.sparkjava:spark-core:2.9.1'
implementation('org.rendersnake:rendersnake:1.9.0') {
exclude group: 'javax.servlet', module: 'servlet-api'
}
implementation files('libs/IJM-1.0-SNAPSHOT-customized2.jar')
implementation files('libs/gpgt-0.0.1-SNAPSHOT.jar')
implementation files('libs/RM-2.2.0-c3.jar')
implementation files('libs/iAST-1.0-SNAPSHOT-customized.jar')
implementation 'io.github.java-diff-utils:java-diff-utils:4.12'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.2'
implementation 'com.beust:jcommander:1.78'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
implementation 'com.opencsv:opencsv:5.5'
implementation 'com.fasterxml.jackson.core:jackson-core:2.5.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.5.2'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.5.2'
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'ch.qos.logback:logback-classic:1.4.12'
implementation 'org.hibernate:hibernate-core:5.3.20.Final' // Replace with the latest Hibernate version
implementation 'org.hibernate:hibernate-entitymanager:5.3.20.Final' // For JPA support
// PostgreSQL JDBC driver
implementation 'org.postgresql:postgresql:42.4.1' // Replace with the latest PostgreSQL JDBC driver version
// implementation 'fr.inria.gforge.spoon.labs:gumtree-spoon-ast-diff:1.73'
implementation files('libs/gumtree-spoon-ast-diff-SNAPSHOT-0.6.jar')
}
task rm2p4_jar(type: Jar) {
archiveFileName = 'RM-2.2.0-c3.jar' //Third customization (c3)
//destinationDir = file('libs/')
from zipTree('libs/RM-2.2.0-c2.jar')
exclude 'org/slf4j/*'
exclude 'org/slf4j/**'
exclude 'org/eclipse/jgit/*'
exclude 'org/eclipse/jgit/**'
exclude 'org/eclipse/jdt/*'
exclude 'org/eclipse/jdt/**'
exclude 'com/github/gumtreediff/*'
exclude 'com/github/gumtreediff/**'
}
task rm2p3_jar(type: Jar) {
archiveFileName = 'RM-2.2.0-c2.jar' //Second customization (c2)
//destinationDir = file('libs/')
from zipTree('libs/RM-2.2.0-customized.jar')
exclude 'org/slf4j/*'
exclude 'org/slf4j/**'
exclude 'org/eclipse/jgit/*'
exclude 'org/eclipse/jgit/**'
exclude 'org/eclipse/jdt/*'
exclude 'org/eclipse/jdt/**'
}
task rm2p2_jar(type: Jar) {
archiveFileName = 'RM-2.2.0-customized.jar'
// Include all contents from the original JAR
//destinationDir = file('libs/')
from zipTree('libs/RM-2.2.0.jar')
exclude 'org/slf4j/*'
exclude 'org/slf4j/**'
}
task rm2p0_jar(type: Jar) {
archiveFileName = 'RM-2.0.0-customized.jar'
// Include all contents from the original JAR
//destinationDir = file('libs/')
from zipTree('libs/RM-2.0.0.jar')
exclude 'org/slf4j/*'
exclude 'org/slf4j/**'
}
task ijm_jar(type: Jar) {
archiveFileName = 'IJM-1.0-SNAPSHOT-customized2.jar'
// Include all contents from the original JAR
//destinationDir = file('libs/')
from zipTree('libs/IJM-1.0-SNAPSHOT-customized.jar')
exclude 'com/google/gson/*'
exclude 'com/google/gson/**'
exclude 'org/slf4j/*'
exclude 'org/slf4j/**'
}
task iast_jar(type: Jar) {
archiveFileName = 'iAST-1.0-SNAPSHOT-customized.jar'
// Include all contents from the original JAR
//destinationDir = file('libs/')
from zipTree('libs/iAST-1.0-SNAPSHOT-shaded.jar')
exclude 'com/google/gson/*'
exclude 'com/google/gson/**'
exclude 'org/slf4j/*'
exclude 'org/slf4j/**'
}
configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-databind:2.5.2'
force 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.5.2'
force 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
}
// exclude group: 'org.slf4j', module: 'slf4j-simple'
}
test {
useJUnitPlatform()
}
def loadEnvFile() {
def envFile = file('.env')
if (envFile.exists()) {
envFile.eachLine { line ->
if (!line.startsWith("#") && line.contains("=")) {
def (key, value) = line.split("=")
project.ext.set(key.trim(), value.trim())
}
}
}
}
// Load the .env file
loadEnvFile()
run {
def refactoringMinerPathValue = System.properties['REFACTORINGMINER_PATH']
if (refactoringMinerPathValue && !refactoringMinerPathValue.isEmpty()) {
systemProperty("REFACTORINGMINER_PATH", refactoringMinerPathValue)
}
doFirst {
project.ext.properties.each { key, value ->
if (key != 'ext') {
systemProperty(key, value)
}
}
}
}