mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 08:31:07 +03:00
[FEATURE] Храним версии зависимостей в отдельном файле (ч. 1)...
This commit is contained in:
parent
233e28a08a
commit
f81e321223
8 changed files with 60 additions and 39 deletions
|
@ -28,10 +28,10 @@
|
|||
}
|
||||
|
||||
jar {
|
||||
dependsOn parent.childProjects.Launcher.tasks.build
|
||||
dependsOn parent.childProjects.Launcher.tasks.assemble
|
||||
from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
from(parent.childProjects.Launcher.tasks.shadowJar.archivePath)
|
||||
from(parent.childProjects.Launcher.tasks.genRuntimeJS.archivePath)
|
||||
from(parent.childProjects.Launcher.tasks.shadowJar)
|
||||
from(parent.childProjects.Launcher.tasks.genRuntimeJS)
|
||||
manifest.attributes("Main-Class": mainClassName,
|
||||
"Premain-Class": mainAgentName,
|
||||
"Can-Redefine-Classes": "true",
|
||||
|
@ -71,24 +71,22 @@ task cleanjar(type: Jar, dependsOn: jar) {
|
|||
|
||||
dependencies {
|
||||
pack project(':LauncherAPI')
|
||||
bundle 'org.ow2.asm:asm-commons:7.3.1'
|
||||
bundle 'mysql:mysql-connector-java:8.0.16'
|
||||
bundle 'org.postgresql:postgresql:42.2.6'
|
||||
bundle 'org.jline:jline:3.13.1'
|
||||
bundle 'org.jline:jline-reader:3.13.1'
|
||||
bundle 'org.jline:jline-terminal:3.13.1'
|
||||
bundle 'net.sf.proguard:proguard-base:6.2.0'
|
||||
bundle 'org.fusesource.jansi:jansi:1.18'
|
||||
bundle 'commons-io:commons-io:2.6'
|
||||
bundle 'commons-codec:commons-codec:1.12'
|
||||
bundle 'org.apache.httpcomponents:httpclient:4.5.10'
|
||||
bundle 'io.netty:netty-all:4.1.43.Final'
|
||||
bundle 'org.hibernate:hibernate-core:5.4.9.Final'
|
||||
bundle 'org.bouncycastle:bcpkix-jdk15on:1.61'
|
||||
|
||||
bundle 'org.slf4j:slf4j-simple:1.7.25'
|
||||
bundle 'org.slf4j:slf4j-api:1.7.25'
|
||||
bundle group: 'org.fusesource.jansi', name:'jansi', version: rootProject['verJansi']
|
||||
bundle group: 'org.jline', name: 'jline', version: rootProject['verJline']
|
||||
bundle group: 'org.jline', name: 'jline-reader', version: rootProject['verJline']
|
||||
bundle group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline']
|
||||
bundle group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: rootProject['verBcpkix']
|
||||
bundle group: 'org.ow2.asm', name: 'asm-commons', version: rootProject['verAsm']
|
||||
bundle group: 'io.netty', name: 'netty-all', version: rootProject['verNetty']
|
||||
bundle group: 'org.slf4j', name: 'slf4j-simple', version: rootProject['verSlf4j']
|
||||
bundle group: 'org.slf4j', name: 'slf4j-api', version: rootProject['verSlf4j']
|
||||
bundle group: 'org.hibernate', name: 'hibernate-core', version: rootProject['verHibernate']
|
||||
bundle group: 'mysql', name: 'mysql-connector-java', version: rootProject['verMySQLConn']
|
||||
bundle group: 'org.postgresql', name: 'postgresql', version: rootProject['verPostgreSQLConn']
|
||||
bundle group: 'net.sf.proguard', name: 'proguard-base', version: rootProject['verProguard']
|
||||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
|
||||
|
||||
//TODO rewrite
|
||||
hikari 'io.micrometer:micrometer-core:1.0.6'
|
||||
hikari('com.zaxxer:HikariCP:3.4.1') {
|
||||
exclude group: 'javassist'
|
||||
|
@ -101,6 +99,7 @@ pack project(':LauncherAPI')
|
|||
exclude group: 'net.java.abeille'
|
||||
exclude group: 'foxtrot'
|
||||
exclude group: 'com.jgoodies'
|
||||
exclude group: 'org.slf4j'
|
||||
}
|
||||
|
||||
launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-win32') {
|
||||
|
@ -110,13 +109,15 @@ pack project(':LauncherAPI')
|
|||
launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-linux') {
|
||||
exclude group: '*'
|
||||
}
|
||||
// Rewrite end.
|
||||
|
||||
compileOnlyA 'com.google.guava:guava:26.0-jre'
|
||||
compileOnlyA 'log4j:log4j:1.2.17' // Do not update (laggy dep).
|
||||
compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC']
|
||||
// Do not update (laggy deps).
|
||||
compileOnlyA 'log4j:log4j:1.2.17'
|
||||
compileOnlyA 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
}
|
||||
|
||||
//TODO rewrite
|
||||
task hikari(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
into "$buildDir/libs/libraries/hikaricp"
|
||||
|
@ -152,10 +153,11 @@ task launch4jA(type: Copy) {
|
|||
fcp.mode = 0755
|
||||
}
|
||||
}
|
||||
// Rewrite end.
|
||||
|
||||
task dumpLibs(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA
|
||||
dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA //TODO rewrite this
|
||||
into "$buildDir/libs/libraries"
|
||||
from configurations.bundleOnly
|
||||
}
|
||||
|
@ -173,7 +175,7 @@ task bundle(type: Zip) {
|
|||
destinationDirectory = file("$buildDir")
|
||||
from(tasks.dumpLibs.destinationDir) { into 'libraries' }
|
||||
from(tasks.dumpCompileOnlyLibs.destinationDir) { into 'launcher-libraries-compile' }
|
||||
from tasks.jar.archivePath
|
||||
from tasks.jar
|
||||
from(parent.childProjects.Launcher.tasks.dumpLibs) { into 'launcher-libraries' }
|
||||
}
|
||||
|
||||
|
|
|
@ -53,9 +53,9 @@ task javadocJar(type: Jar) {
|
|||
|
||||
dependencies {
|
||||
pack project(':LauncherAPI')
|
||||
bundle 'com.github.oshi:oshi-core:3.13.0'
|
||||
pack 'io.netty:netty-codec-http:4.1.43.Final'
|
||||
pack 'org.ow2.asm:asm-tree:7.1'
|
||||
bundle group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore']
|
||||
pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty']
|
||||
pack group: 'org.ow2.asm', name: 'asm-tree', version: rootProject['verAsm']
|
||||
}
|
||||
|
||||
task genRuntimeJS(type: Zip) {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
dependencies {
|
||||
api project(':LauncherCore')
|
||||
compileOnly 'io.netty:netty-codec-http:4.1.43.Final'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
compileOnly group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty']
|
||||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
dependencies {
|
||||
api project(':LauncherAPI')
|
||||
compileOnly 'com.google.guava:guava:26.0-jre'
|
||||
compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC']
|
||||
api files('../compat/authlib/authlib-clean.jar')
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
targetCompatibility = '1.8'
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.fusesource.jansi:jansi:1.18'
|
||||
compileOnly 'org.jline:jline:3.11.0'
|
||||
compileOnly 'org.jline:jline-reader:3.11.0'
|
||||
compileOnly 'org.jline:jline-terminal:3.11.0'
|
||||
compileOnly 'org.bouncycastle:bcprov-jdk15:1.46'
|
||||
api 'com.google.code.gson:gson:2.8.5'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
compileOnly group: 'org.fusesource.jansi', name:'jansi', version: rootProject['verJansi']
|
||||
compileOnly group: 'org.jline', name: 'jline', version: rootProject['verJline']
|
||||
compileOnly group: 'org.jline', name: 'jline-reader', version: rootProject['verJline']
|
||||
compileOnly group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline']
|
||||
compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15', version: rootProject['verBcprov']
|
||||
api group: 'com.google.code.gson', name: 'gson', version: rootProject['verGson']
|
||||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -38,7 +38,7 @@ task javadocJar(type: Jar) {
|
|||
|
||||
dependencies {
|
||||
pack project(':LauncherAuthlib')
|
||||
pack 'io.netty:netty-codec-http:4.1.43.Final'
|
||||
pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty']
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
group = 'pro.gravit.launcher'
|
||||
version = '5.1.1-SNAPSHOT'
|
||||
|
||||
apply from: 'props.gradle'
|
||||
|
||||
configure(subprojects.findAll { it.name != 'modules' }) {
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'eclipse'
|
||||
|
|
17
props.gradle
Normal file
17
props.gradle
Normal file
|
@ -0,0 +1,17 @@
|
|||
project.ext {
|
||||
verAsm = '7.1'
|
||||
verNetty = '4.1.43.Final'
|
||||
verOshiCore = '3.13.0'
|
||||
verJunit = '5.4.1'
|
||||
verGuavaC = '26.0-jre'
|
||||
verJansi = '1.18'
|
||||
verJline = '3.11.0'
|
||||
verBcprov = '1.46'
|
||||
verGson = '2.8.5'
|
||||
verBcpkix = '1.61'
|
||||
verSlf4j = '1.7.25'
|
||||
verMySQLConn = '8.0.16'
|
||||
verPostgreSQLConn = '42.2.6'
|
||||
verProguard = '6.2.0'
|
||||
verHibernate = '5.4.9.Final'
|
||||
}
|
Loading…
Reference in a new issue