|
1 |
| -// this project is licensed under LGPLv3. |
2 |
| -// DO NOT ADD any dependency which isn't compatible with LGPLv3, such as: |
3 |
| -// - GPLv2, GPLv2+ |
4 |
| -// - GPLv3, GPLv3+ |
5 |
| -// - EPL 1.0 |
6 |
| -// |
7 |
| -// The following licenses were checked for compatibility for use as libraries: |
8 |
| -// - Apache 2.0 |
9 |
| -// - MIT |
10 |
| -// - BSD licenses |
11 |
| -// - EPL2.0 (see https://www.eclipse.org/legal/epl-2.0/faq.php#h.hsnsfg4e0htq) |
12 |
| -// - LGPLv2, LGPLv2+, LGPLv3 |
13 |
| -// - GPLv2 with classpath exception |
14 |
| -// - CC Attribution |
15 |
| - |
16 | 1 | import static org.apache.tools.ant.taskdefs.condition.Os.*
|
17 | 2 |
|
18 | 3 | plugins {
|
19 | 4 | id 'java'
|
20 |
| - // must be kept in sync with kotlin_version below |
21 |
| - id 'org.jetbrains.kotlin.jvm' version '1.7.21' |
22 |
| - id 'com.google.devtools.ksp' version '1.7.21-1.0.8' apply false |
| 5 | + alias(libs.plugins.kotlin.jvm) |
| 6 | + alias(libs.plugins.ksp) apply false |
23 | 7 | id 'application'
|
24 | 8 | id 'checkstyle'
|
25 |
| - id 'com.github.spotbugs' version '5.0.+' |
26 |
| - id 'com.github.johnrengelman.shadow' version '7.1.2' |
| 9 | + alias(libs.plugins.spotbugs) |
| 10 | + alias(libs.plugins.shadow) |
27 | 11 | id 'jacoco'
|
28 | 12 | }
|
29 | 13 |
|
30 |
| -// must be kept in sync across all modules |
31 |
| -def kotlin_version = '1.7.21' |
32 |
| - |
33 |
| - |
34 | 14 | // region DEPENDENCIES
|
35 | 15 |
|
36 | 16 | repositories {
|
37 | 17 | mavenCentral()
|
38 | 18 | }
|
39 | 19 |
|
40 | 20 | dependencies {
|
| 21 | + // PLEASE ADD AND UPDATE DEPENDENCIES USING libs.versions.toml |
| 22 | + |
41 | 23 | implementation project(':osrd-railjson')
|
42 | 24 |
|
43 | 25 | // kotlin
|
44 |
| - implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version // Apache 2.0 |
45 |
| - implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.6.+' // Apache 2.0 |
46 |
| - implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-test', version: '1.6.+' // Apache 2.0 |
47 |
| - testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-test', version: kotlin_version // Apache 2.0 |
| 26 | + implementation libs.kotlin.stdlib |
| 27 | + implementation libs.kotlinx.coroutines.core |
| 28 | + testImplementation libs.kotlin.test |
| 29 | + testImplementation libs.kotlinx.coroutines.test |
48 | 30 |
|
49 | 31 | implementation project(':kt-osrd-signaling')
|
50 | 32 | implementation project(":kt-osrd-sim-interlocking")
|
51 | 33 | implementation project(":kt-osrd-sim-infra")
|
52 | 34 |
|
53 | 35 | // base primitives
|
54 |
| - implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre' // Apache 2.0 |
| 36 | + implementation libs.guava |
55 | 37 |
|
56 | 38 | // command line parsing
|
57 |
| - implementation group: 'com.beust', name: 'jcommander', version: '1.82' // Apache 2.0 |
| 39 | + implementation libs.jcommander |
58 | 40 |
|
59 | 41 | // fast primitive collections
|
60 |
| - implementation group: 'com.carrotsearch', name: 'hppc', version: '0.9.1' // Apache 2.0 |
| 42 | + implementation libs.hppc |
61 | 43 |
|
62 | 44 | // JSON parsing
|
63 |
| - implementation 'com.squareup.moshi:moshi:1.14.0' // Apache 2.0 |
64 |
| - implementation 'com.squareup.moshi:moshi-adapters:1.14.0' // Apache 2.0 |
| 45 | + implementation libs.moshi |
| 46 | + implementation libs.moshi.adapters |
65 | 47 |
|
66 | 48 | // HTTP server framework
|
67 |
| - implementation group: 'org.takes', name: 'takes', version: '1.24.+' // MIT |
68 |
| - implementation group: 'javax.json', name: 'javax.json-api', version: '1.1.4' // GPLv2 with classpath exemption |
| 49 | + implementation libs.takes |
| 50 | + implementation libs.javax.json.api |
69 | 51 |
|
70 | 52 | // HTTP client
|
71 |
| - implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.10.0' // Apache 2.0 |
| 53 | + implementation libs.okhttp |
72 | 54 |
|
73 | 55 | // ClassGraph (FastClasspathScanner)
|
74 |
| - implementation group: 'io.github.classgraph', name: 'classgraph', version: '4.8.+' // MIT |
| 56 | + implementation libs.classgraph |
75 | 57 |
|
76 | 58 | // for debug UI
|
77 |
| - implementation 'com.github.yannrichet:JMathPlot:1.0.1' // BSD |
| 59 | + implementation libs.jmathplot |
78 | 60 |
|
79 | 61 | // the logging API stub
|
80 |
| - implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.+' // MIT |
| 62 | + implementation libs.slf4j |
81 | 63 |
|
82 | 64 | // the logging API implementation
|
83 |
| - implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.+' // EPL 1.0 (incompatible) and LGPL 2.1 (compatible) |
84 |
| - implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.+' |
| 65 | + implementation libs.logback.core |
| 66 | + implementation libs.logback.classic |
85 | 67 |
|
86 | 68 | // Sentry
|
87 |
| - implementation group: 'io.sentry', name: 'sentry', version: '6.8.+' // MIT |
| 69 | + implementation libs.sentry |
88 | 70 |
|
89 | 71 | // Use JUnit Jupiter API for testing.
|
90 |
| - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.+' // EPL 2.0 |
91 |
| - testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.+' // EPL 2.0 |
| 72 | + testImplementation libs.junit.jupiter.api |
| 73 | + testImplementation libs.junit.jupiter.params |
92 | 74 | // Use JUnit Jupiter Engine for testing.
|
93 |
| - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.+' // EPL 2.0 |
| 75 | + testRuntimeOnly libs.junit.jupiter.engine |
94 | 76 | // jqwik for property based testing
|
95 |
| - testImplementation 'net.jqwik:jqwik:1.7.+' // EPL 2.0 |
| 77 | + testImplementation libs.jqwik |
96 | 78 | // mockito for mocking
|
97 |
| - testImplementation group: 'org.mockito', name: 'mockito-inline', version: '4.9.+' // MIT |
98 |
| - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '4.9.+' // MIT |
| 79 | + testImplementation libs.mockito.inline |
| 80 | + testImplementation libs.mockito.junit.jupiter |
99 | 81 |
|
100 | 82 | // Only needed to run tests in a version of IntelliJ IDEA that bundles older versions
|
101 |
| - testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.9.+' // EPL 2.0 |
| 83 | + testRuntimeOnly libs.junit.platform.launcher |
102 | 84 |
|
103 | 85 | // for linter annotations
|
104 |
| - compileOnly 'net.jcip:jcip-annotations:1.0' // CC Attribution |
105 |
| - compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.7.+' // LGPLv2.1 |
106 |
| - testCompileOnly 'net.jcip:jcip-annotations:1.0' // CC Attribution |
107 |
| - testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.7.+' // LGPLv2.1 |
| 86 | + compileOnly libs.jcip.annotations |
| 87 | + compileOnly libs.spotbugs.annotations |
| 88 | + testCompileOnly libs.jcip.annotations |
| 89 | + testCompileOnly libs.spotbugs.annotations |
108 | 90 | }
|
109 | 91 |
|
110 | 92 | // endregion
|
|
0 commit comments