Skip to content

Commit

Permalink
Merge 14ab3df into 2b3e0e5
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx authored Feb 24, 2025
2 parents 2b3e0e5 + 14ab3df commit 4ecb85a
Show file tree
Hide file tree
Showing 13 changed files with 179 additions and 117 deletions.
14 changes: 7 additions & 7 deletions app/gui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ mainClassName = 'org.mobilitydata.gtfsvalidator.app.gui.Main'
dependencies {
implementation project(':core')
implementation project(':main')
implementation 'com.google.flogger:flogger:0.6'
implementation 'com.google.flogger:flogger-system-backend:0.6'
testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation 'com.google.truth:truth:1.0.1'
testImplementation 'com.google.truth.extensions:truth-java8-extension:1.0.1'
testImplementation 'org.mockito:mockito-core:4.5.1'
implementation libs.flogger
implementation libs.flogger.system.backend
testImplementation libs.junit
testImplementation libs.truth
testImplementation libs.truth.extension
testImplementation libs.mockito.core
}

jar {
Expand All @@ -47,7 +47,7 @@ shadowJar {
// loaded via reflection
exclude(project(':main'))

exclude(dependency('org.apache.httpcomponents:httpclient'))
exclude(dependency(libs.httpclient5.get().toString()))
}

// Some of our dependencies include their own module-info declarations. We drop
Expand Down
20 changes: 10 additions & 10 deletions cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ shadowJar {
// Validator classes are loaded dynamically from the main project, so we exclude the project
// from minimization.
exclude(project(':main'))
exclude(dependency('org.apache.httpcomponents:httpclient'))
exclude(dependency(libs.httpclient5.get().toString()))
}
// Change the JAR name from 'main' to 'gtfs-validator'
archiveBaseName = rootProject.name
Expand All @@ -50,15 +50,15 @@ mainClassName = 'org.mobilitydata.gtfsvalidator.cli.Main'
dependencies {
implementation project(':core')
implementation project(':main')
implementation 'com.beust:jcommander:1.48'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.flogger:flogger:0.6'
implementation 'com.google.flogger:flogger-system-backend:0.6'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation libs.jcommander
implementation libs.gson
implementation libs.flogger
implementation libs.flogger.system.backend
implementation libs.guava

testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation 'com.google.truth:truth:1.0.1'
testImplementation 'com.google.truth.extensions:truth-java8-extension:1.0.1'
testImplementation 'org.mockito:mockito-core:4.5.1'
testImplementation libs.junit
testImplementation libs.truth
testImplementation libs.truth.extension
testImplementation libs.mockito.core
}

44 changes: 22 additions & 22 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ plugins {
dependencies {
implementation project(':model')
annotationProcessor project(':processor:notices')
annotationProcessor 'com.google.auto.value:auto-value:1.7.4'
compileOnly 'com.google.auto.value:auto-value-annotations:1.7.4'
implementation 'org.apache.commons:commons-compress:1.20'
implementation 'org.apache.commons:commons-lang3:3.0'
implementation 'javax.inject:javax.inject:1'
implementation 'org.apache.httpcomponents:httpclient:4.5.2'
implementation 'commons-io:commons-io:2.8.0'
implementation 'com.univocity:univocity-parsers:2.9.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.geometry:s2-geometry:2.0.0'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'commons-validator:commons-validator:1.6'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.13'
implementation 'com.google.flogger:flogger:0.6'
implementation 'io.github.classgraph:classgraph:4.8.146'
implementation 'org.aspectj:aspectjrt:1.9.20'
implementation 'org.aspectj:aspectjweaver:1.9.20'
testImplementation 'com.google.flogger:flogger-system-backend:0.6'
testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation "com.google.truth:truth:1.0.1"
testImplementation 'com.google.truth.extensions:truth-java8-extension:1.0.1'
testImplementation 'org.mockito:mockito-core:4.5.1'
annotationProcessor libs.auto.value
compileOnly libs.auto.value.annotations
implementation libs.commons.compress
implementation libs.commons.lang3
implementation libs.javax.inject
implementation libs.httpclient5
implementation libs.commons.io
implementation libs.univocity.parsers
implementation libs.gson
implementation libs.geometry
implementation libs.guava
implementation libs.commons.validator
implementation libs.libphonenumber
implementation libs.flogger
implementation libs.classgraph
implementation libs.aspectjrt
implementation libs.aspectjrt.weaver
testImplementation libs.flogger.system.backend
testImplementation libs.junit
testImplementation libs.truth
testImplementation libs.truth.extension
testImplementation libs.mockito.core
}

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import java.io.OutputStream;
import java.net.URISyntaxException;
import java.net.URL;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.client5.http.impl.classic.HttpClients;

public class HttpGetUtil {

Expand All @@ -49,16 +49,14 @@ public static String getUserAgent(String validatorVersion) {
* @param sourceUrl the fully qualified URL
* @param outputStream the output stream
* @param validatorVersion the version of the validator
* @throws IOException if no file could not be found at the specified location
* @throws URISyntaxException if URL is malformed
*/
public static void loadFromUrl(URL sourceUrl, OutputStream outputStream, String validatorVersion)
throws IOException, URISyntaxException {
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpGet httpGet = new HttpGet(sourceUrl.toURI());
httpGet.setHeader("User-Agent", getUserAgent(validatorVersion));
try (CloseableHttpResponse httpResponse = httpClient.execute(httpGet)) {
httpResponse.getEntity().writeTo(outputStream);
HttpGet request = new HttpGet(sourceUrl.toString());
request.addHeader("User-Agent", getUserAgent(validatorVersion));
try (CloseableHttpResponse response = httpClient.execute(request)) {
response.getEntity().writeTo(outputStream);
}
}
}
Expand Down
68 changes: 66 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,71 @@
[versions]
spotless = "7.0.2"
shadow-jar = '7.1.2'
shadow-jar = "7.1.2"
apacheCommonsLang = "3.6"
autoService = "1.0.1"
flogger = "0.6"
floggerBackend = "0.6"
gson = "2.8.6"
autoValue = "1.7.4"
autoValueAnnotations = "1.7.4"
guava = "31.0.1-jre"
univocityParsers = "2.9.0"
commonsCompress = "1.20"
mockito = "4.5.1"
junit = "4.13"
truth = "1.1.3"
truthExtension = "1.0.1"
javaxInject = "1"
httpClient5 = "5.0.3"
geometry = "2.0.0"
libphonenumber = "8.12.13"
classgraph = "4.8.146"
thymeleaf = "3.0.15.RELEASE"
locationtech = "1.20.0"
flexmark = "0.64.8"
commonsIO = "2.8.0"
commonsValidator = "1.6"
jcommander = "1.48"
javaPoet = "1.13.0"
apiClient = "1.31.2"
jetbrainsAnnotations = "20.1.0"
aspectjrt = "1.9.20"
aspectjrtweaver = "1.9.20"
findbugs = "3.0.2"

[plugins]
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
shadow-jar = { id = 'com.github.johnrengelman.shadow', version.ref = 'shadow-jar' }
shadow-jar = { id = "com.github.johnrengelman.shadow", version.ref = "shadow-jar" }

[libraries]
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "apacheCommonsLang" }
auto-service = { module = "com.google.auto.service:auto-service", version.ref = "autoService" }
flogger = { module = "com.google.flogger:flogger", version.ref = "flogger" }
flogger-system-backend = { module = "com.google.flogger:flogger-system-backend", version.ref = "floggerBackend" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
auto-value = { module = "com.google.auto.value:auto-value", version.ref = "autoValue" }
auto-value-annotations = { module = "com.google.auto.value:auto-value-annotations", version.ref = "autoValueAnnotations" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
univocity-parsers = { module = "com.univocity:univocity-parsers", version.ref = "univocityParsers" }
commons-compress = { module = "org.apache.commons:commons-compress", version.ref = "commonsCompress" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
junit = { module = "junit:junit", version.ref = "junit" }
truth = { module = "com.google.truth:truth", version.ref = "truth" }
truth-extension = { module = "com.google.truth.extensions:truth-java8-extension", version.ref = "truthExtension" }
javax-inject = { module = "javax.inject:javax.inject", version.ref = "javaxInject" }
httpclient5 = { module = "org.apache.httpcomponents.client5:httpclient5", version.ref = "httpClient5" }
geometry = { module = "com.google.geometry:s2-geometry", version.ref = "geometry" }
libphonenumber = { module = "com.googlecode.libphonenumber:libphonenumber", version.ref = "libphonenumber" }
classgraph = { module = "io.github.classgraph:classgraph", version.ref = "classgraph" }
location-tech = { module = "org.locationtech.jts:jts-core", version.ref = "locationtech" }
thymeleaf = { module = "org.thymeleaf:thymeleaf", version.ref = "thymeleaf" }
flexmark = { module = "com.vladsch.flexmark:flexmark-all", version.ref = "flexmark" }
commons-io = { module = "commons-io:commons-io", version.ref = "commonsIO" }
commons-validator = { module = "commons-validator:commons-validator", version.ref = "commonsValidator" }
jcommander = { module = "com.beust:jcommander", version.ref = "jcommander" }
java-poet = { module = "com.squareup:javapoet", version.ref = "javaPoet" }
api-client = { module = "com.google.api-client:google-api-client", version.ref = "apiClient" }
jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" }
aspectjrt = { module = "org.aspectj:aspectjrt", version.ref = "aspectjrt" }
aspectjrt-weaver = { module = "org.aspectj:aspectjweaver", version.ref = "aspectjrtweaver" }
findbugs = { module = "com.google.code.findbugs:jsr305", version.ref = "findbugs" }
36 changes: 18 additions & 18 deletions main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ dependencies {
compileOnly project(':processor')
implementation project(':model')
implementation project(':core')
annotationProcessor 'com.google.auto.value:auto-value:1.7.4'
compileOnly 'com.google.auto.value:auto-value-annotations:1.7.4'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.0.3'
implementation 'javax.inject:javax.inject:1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'com.google.flogger:flogger:0.6'
implementation 'com.google.flogger:flogger-system-backend:0.6'
implementation 'com.univocity:univocity-parsers:2.9.0'
implementation 'com.google.geometry:s2-geometry:2.0.0'
implementation 'org.thymeleaf:thymeleaf:3.0.15.RELEASE'
implementation 'com.vladsch.flexmark:flexmark-all:0.64.8'
implementation 'io.github.classgraph:classgraph:4.8.146'
implementation 'org.locationtech.jts:jts-core:1.20.0'
testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation 'com.google.truth:truth:1.0.1'
testImplementation 'com.google.truth.extensions:truth-java8-extension:1.0.1'
testImplementation 'org.mockito:mockito-core:4.5.1'
annotationProcessor libs.auto.value
compileOnly libs.auto.value.annotations
implementation libs.httpclient5
implementation libs.javax.inject
implementation libs.gson
implementation libs.guava
implementation libs.flogger
implementation libs.flogger.system.backend
implementation libs.univocity.parsers
implementation libs.geometry
implementation libs.thymeleaf
implementation libs.flexmark
implementation libs.classgraph
implementation libs.location.tech
testImplementation libs.junit
testImplementation libs.truth
testImplementation libs.truth.extension
testImplementation libs.mockito.core
}
8 changes: 4 additions & 4 deletions model/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ plugins {


dependencies {
annotationProcessor 'com.google.auto.value:auto-value:1.7.4'
compileOnly 'com.google.auto.value:auto-value-annotations:1.7.4'
implementation 'org.jetbrains:annotations:20.1.0'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
annotationProcessor libs.auto.value
compileOnly libs.auto.value.annotations
implementation libs.jetbrains.annotations
implementation libs.findbugs
}
20 changes: 10 additions & 10 deletions output-comparator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ plugins {
dependencies {
implementation project(':model')
implementation project(':core')
implementation 'commons-io:commons-io:2.8.0'
implementation 'com.google.api-client:google-api-client:1.31.2'
annotationProcessor 'com.google.auto.value:auto-value:1.7.4'
compileOnly 'com.google.auto.value:auto-value-annotations:1.7.4'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'com.google.flogger:flogger:0.5.1'
implementation 'com.google.flogger:flogger-system-backend:0.5.1'
implementation 'com.beust:jcommander:1.48'
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation "com.google.truth:truth:1.0.1"
implementation libs.commons.io
implementation libs.api.client
annotationProcessor libs.auto.value
compileOnly libs.auto.value.annotations
implementation libs.guava
implementation libs.flogger
implementation libs.flogger.system.backend
implementation libs.jcommander
implementation libs.gson
testImplementation libs.truth
testImplementation group: 'junit', name: 'junit', version: '4.9'
}

Expand Down
26 changes: 13 additions & 13 deletions processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ plugins {
dependencies {
implementation project(':model')
implementation project(':core')
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc4'
compileOnly 'com.google.auto.service:auto-service:1.0-rc4'
annotationProcessor 'com.google.auto.value:auto-value:1.7.4'
compileOnly 'com.google.auto.value:auto-value-annotations:1.7.4'
implementation 'javax.inject:javax.inject:1'
implementation 'com.squareup:javapoet:1.13.0'
implementation 'org.apache.commons:commons-lang3:3.6'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'com.google.flogger:flogger:0.6'
implementation 'com.univocity:univocity-parsers:2.9.0'
implementation 'com.google.geometry:s2-geometry:2.0.0'
testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation 'com.google.truth:truth:1.0.1'
annotationProcessor libs.auto.service
compileOnly libs.auto.service
annotationProcessor libs.auto.value
compileOnly libs.auto.value.annotations
implementation libs.javax.inject
implementation libs.java.poet
implementation libs.commons.lang3
implementation libs.guava
implementation libs.flogger
implementation libs.univocity.parsers
implementation libs.geometry
testImplementation libs.junit
testImplementation libs.truth
}

14 changes: 7 additions & 7 deletions processor/notices/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ repositories {

dependencies {
implementation project(':model')
annotationProcessor 'com.google.auto.service:auto-service:1.0.1'
compileOnly 'com.google.auto.service:auto-service:1.0.1'
implementation 'org.apache.commons:commons-lang3:3.0'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation 'com.google.truth:truth:1.1.3'
annotationProcessor libs.auto.service
compileOnly libs.auto.service
implementation libs.commons.lang3
implementation libs.guava
implementation libs.gson
testImplementation libs.junit
testImplementation libs.truth
}

test {
Expand Down
8 changes: 4 additions & 4 deletions processor/notices/tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ repositories {
dependencies {
annotationProcessor project(":processor:notices")
implementation project(':model')
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'junit:junit:4.13'
testImplementation 'com.google.truth:truth:1.0.1'
testImplementation 'com.google.truth.extensions:truth-java8-extension:1.0.1'
implementation libs.gson
testImplementation libs.junit
testImplementation libs.truth
testImplementation libs.truth.extension
}

test {
Expand Down
18 changes: 9 additions & 9 deletions processor/tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ dependencies {
compileOnly project(':processor')
implementation project(':model')
implementation project(':core')
annotationProcessor 'com.google.auto.value:auto-value:1.7.4'
compileOnly 'com.google.auto.value:auto-value-annotations:1.7.4'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'com.google.flogger:flogger:0.6'
implementation 'com.google.flogger:flogger-system-backend:0.6'
implementation 'com.univocity:univocity-parsers:2.9.0'
testImplementation 'junit:junit:4.13'
testImplementation 'com.google.truth:truth:1.0.1'
testImplementation 'com.google.truth.extensions:truth-java8-extension:1.0.1'
annotationProcessor libs.auto.value
compileOnly libs.auto.value.annotations
implementation libs.guava
implementation libs.flogger
implementation libs.flogger.system.backend
implementation libs.univocity.parsers
testImplementation libs.junit
testImplementation libs.truth
testImplementation libs.truth.extension
}
Loading

0 comments on commit 4ecb85a

Please sign in to comment.