Use separate dependency versions declaration

This commit is contained in:
aNNiMON 2023-08-27 14:59:38 +03:00 committed by Victor Melnik
parent 219d654fe5
commit 0cdbbc1e8c
6 changed files with 37 additions and 20 deletions

View File

@ -1,12 +1,27 @@
ext {
versions = [
json: '20230227', // org.json:json
snakeyaml: '1.20', // org.yaml:snakeyaml
okhttp: '3.8.1', // com.squareup.okhttp3:okhttp
socket: '1.0.2', // io.socket:socket.io-client
jline: '2.14.5', // jline:jline
junit: '5.9.2', // org.junit:junit-bom
jmh: '1.37' // org.openjdk.jmh:jmh-core
]
}
allprojects { allprojects {
repositories { repositories {
mavenCentral() mavenCentral()
} }
gradle.projectsEvaluated { gradle.projectsEvaluated {
tasks.withType(JavaCompile) { tasks.withType(JavaCompile).tap {
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
} }
} }
} }

View File

@ -9,14 +9,14 @@ version = '2.0-SNAPSHOT'
dependencies { dependencies {
api project(":ownlang-core") api project(":ownlang-core")
implementation 'com.squareup.okhttp3:okhttp:3.8.1' implementation "com.squareup.okhttp3:okhttp:${versions.okhttp}"
implementation ('io.socket:socket.io-client:1.0.2') { implementation ("io.socket:socket.io-client:${versions.socket}") {
exclude group: 'org.json', module: 'json' exclude group: 'org.json', module: 'json'
} }
implementation 'org.json:json:20230227' implementation "org.json:json:${versions.json}"
implementation 'org.yaml:snakeyaml:1.20' implementation "org.yaml:snakeyaml:${versions.snakeyaml}"
testImplementation platform('org.junit:junit-bom:5.9.2') testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
} }

View File

@ -6,9 +6,9 @@ group = 'com.annimon'
version = '2.0-SNAPSHOT' version = '2.0-SNAPSHOT'
dependencies { dependencies {
implementation 'org.json:json:20230227' implementation "org.json:json:${versions.json}"
testImplementation platform('org.junit:junit-bom:5.9.2') testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
} }

View File

@ -1,4 +1,5 @@
plugins { plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'java' id 'java'
id 'application' id 'application'
} }
@ -16,7 +17,7 @@ dependencies {
implementation project(":ownlang-utils") implementation project(":ownlang-utils")
implementation project(":modules:main") implementation project(":modules:main")
testImplementation platform('org.junit:junit-bom:5.9.2') testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
} }

View File

@ -6,13 +6,14 @@ group = 'com.annimon'
version = '2.0-SNAPSHOT' version = '2.0-SNAPSHOT'
dependencies { dependencies {
api project(":ownlang-core") api project(':ownlang-core')
testImplementation platform('org.junit:junit-bom:5.9.2') testImplementation project(':modules:main')
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.2' testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation "org.junit.jupiter:junit-jupiter-params:${versions.junit}"
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.openjdk.jmh:jmh-core:1.37' testImplementation "org.openjdk.jmh:jmh-core:${versions.jmh}"
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.37' testImplementation "org.openjdk.jmh:jmh-generator-annprocess:${versions.jmh}"
} }
test { test {

View File

@ -7,11 +7,11 @@ version = '2.0-SNAPSHOT'
dependencies { dependencies {
api project(":ownlang-parser") api project(":ownlang-parser")
implementation 'org.json:json:20230227' implementation "org.json:json:${versions.json}"
implementation 'org.yaml:snakeyaml:1.20' implementation "org.yaml:snakeyaml:${versions.snakeyaml}"
implementation 'jline:jline:2.14.5' implementation "jline:jline:${versions.jline}"
testImplementation platform('org.junit:junit-bom:5.9.2') testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
} }