mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-18 05:53:02 +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 {
|
jar {
|
||||||
dependsOn parent.childProjects.Launcher.tasks.build
|
dependsOn parent.childProjects.Launcher.tasks.assemble
|
||||||
from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
from(parent.childProjects.Launcher.tasks.shadowJar.archivePath)
|
from(parent.childProjects.Launcher.tasks.shadowJar)
|
||||||
from(parent.childProjects.Launcher.tasks.genRuntimeJS.archivePath)
|
from(parent.childProjects.Launcher.tasks.genRuntimeJS)
|
||||||
manifest.attributes("Main-Class": mainClassName,
|
manifest.attributes("Main-Class": mainClassName,
|
||||||
"Premain-Class": mainAgentName,
|
"Premain-Class": mainAgentName,
|
||||||
"Can-Redefine-Classes": "true",
|
"Can-Redefine-Classes": "true",
|
||||||
|
@ -71,24 +71,22 @@ task cleanjar(type: Jar, dependsOn: jar) {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
pack project(':LauncherAPI')
|
pack project(':LauncherAPI')
|
||||||
bundle 'org.ow2.asm:asm-commons:7.3.1'
|
bundle group: 'org.fusesource.jansi', name:'jansi', version: rootProject['verJansi']
|
||||||
bundle 'mysql:mysql-connector-java:8.0.16'
|
bundle group: 'org.jline', name: 'jline', version: rootProject['verJline']
|
||||||
bundle 'org.postgresql:postgresql:42.2.6'
|
bundle group: 'org.jline', name: 'jline-reader', version: rootProject['verJline']
|
||||||
bundle 'org.jline:jline:3.13.1'
|
bundle group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline']
|
||||||
bundle 'org.jline:jline-reader:3.13.1'
|
bundle group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: rootProject['verBcpkix']
|
||||||
bundle 'org.jline:jline-terminal:3.13.1'
|
bundle group: 'org.ow2.asm', name: 'asm-commons', version: rootProject['verAsm']
|
||||||
bundle 'net.sf.proguard:proguard-base:6.2.0'
|
bundle group: 'io.netty', name: 'netty-all', version: rootProject['verNetty']
|
||||||
bundle 'org.fusesource.jansi:jansi:1.18'
|
bundle group: 'org.slf4j', name: 'slf4j-simple', version: rootProject['verSlf4j']
|
||||||
bundle 'commons-io:commons-io:2.6'
|
bundle group: 'org.slf4j', name: 'slf4j-api', version: rootProject['verSlf4j']
|
||||||
bundle 'commons-codec:commons-codec:1.12'
|
bundle group: 'org.hibernate', name: 'hibernate-core', version: rootProject['verHibernate']
|
||||||
bundle 'org.apache.httpcomponents:httpclient:4.5.10'
|
bundle group: 'mysql', name: 'mysql-connector-java', version: rootProject['verMySQLConn']
|
||||||
bundle 'io.netty:netty-all:4.1.43.Final'
|
bundle group: 'org.postgresql', name: 'postgresql', version: rootProject['verPostgreSQLConn']
|
||||||
bundle 'org.hibernate:hibernate-core:5.4.9.Final'
|
bundle group: 'net.sf.proguard', name: 'proguard-base', version: rootProject['verProguard']
|
||||||
bundle 'org.bouncycastle:bcpkix-jdk15on:1.61'
|
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
|
||||||
|
|
||||||
bundle 'org.slf4j:slf4j-simple:1.7.25'
|
|
||||||
bundle 'org.slf4j:slf4j-api:1.7.25'
|
|
||||||
|
|
||||||
|
//TODO rewrite
|
||||||
hikari 'io.micrometer:micrometer-core:1.0.6'
|
hikari 'io.micrometer:micrometer-core:1.0.6'
|
||||||
hikari('com.zaxxer:HikariCP:3.4.1') {
|
hikari('com.zaxxer:HikariCP:3.4.1') {
|
||||||
exclude group: 'javassist'
|
exclude group: 'javassist'
|
||||||
|
@ -101,6 +99,7 @@ pack project(':LauncherAPI')
|
||||||
exclude group: 'net.java.abeille'
|
exclude group: 'net.java.abeille'
|
||||||
exclude group: 'foxtrot'
|
exclude group: 'foxtrot'
|
||||||
exclude group: 'com.jgoodies'
|
exclude group: 'com.jgoodies'
|
||||||
|
exclude group: 'org.slf4j'
|
||||||
}
|
}
|
||||||
|
|
||||||
launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-win32') {
|
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') {
|
launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-linux') {
|
||||||
exclude group: '*'
|
exclude group: '*'
|
||||||
}
|
}
|
||||||
|
// Rewrite end.
|
||||||
|
|
||||||
compileOnlyA 'com.google.guava:guava:26.0-jre'
|
compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC']
|
||||||
compileOnlyA 'log4j:log4j:1.2.17' // Do not update (laggy dep).
|
// Do not update (laggy deps).
|
||||||
|
compileOnlyA 'log4j:log4j:1.2.17'
|
||||||
compileOnlyA 'org.apache.logging.log4j:log4j-core:2.11.2'
|
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) {
|
task hikari(type: Copy) {
|
||||||
duplicatesStrategy = 'EXCLUDE'
|
duplicatesStrategy = 'EXCLUDE'
|
||||||
into "$buildDir/libs/libraries/hikaricp"
|
into "$buildDir/libs/libraries/hikaricp"
|
||||||
|
@ -152,10 +153,11 @@ task launch4jA(type: Copy) {
|
||||||
fcp.mode = 0755
|
fcp.mode = 0755
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Rewrite end.
|
||||||
|
|
||||||
task dumpLibs(type: Copy) {
|
task dumpLibs(type: Copy) {
|
||||||
duplicatesStrategy = 'EXCLUDE'
|
duplicatesStrategy = 'EXCLUDE'
|
||||||
dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA
|
dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA //TODO rewrite this
|
||||||
into "$buildDir/libs/libraries"
|
into "$buildDir/libs/libraries"
|
||||||
from configurations.bundleOnly
|
from configurations.bundleOnly
|
||||||
}
|
}
|
||||||
|
@ -173,7 +175,7 @@ task bundle(type: Zip) {
|
||||||
destinationDirectory = file("$buildDir")
|
destinationDirectory = file("$buildDir")
|
||||||
from(tasks.dumpLibs.destinationDir) { into 'libraries' }
|
from(tasks.dumpLibs.destinationDir) { into 'libraries' }
|
||||||
from(tasks.dumpCompileOnlyLibs.destinationDir) { into 'launcher-libraries-compile' }
|
from(tasks.dumpCompileOnlyLibs.destinationDir) { into 'launcher-libraries-compile' }
|
||||||
from tasks.jar.archivePath
|
from tasks.jar
|
||||||
from(parent.childProjects.Launcher.tasks.dumpLibs) { into 'launcher-libraries' }
|
from(parent.childProjects.Launcher.tasks.dumpLibs) { into 'launcher-libraries' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@ task javadocJar(type: Jar) {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
pack project(':LauncherAPI')
|
pack project(':LauncherAPI')
|
||||||
bundle 'com.github.oshi:oshi-core:3.13.0'
|
bundle group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore']
|
||||||
pack 'io.netty:netty-codec-http:4.1.43.Final'
|
pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty']
|
||||||
pack 'org.ow2.asm:asm-tree:7.1'
|
pack group: 'org.ow2.asm', name: 'asm-tree', version: rootProject['verAsm']
|
||||||
}
|
}
|
||||||
|
|
||||||
task genRuntimeJS(type: Zip) {
|
task genRuntimeJS(type: Zip) {
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':LauncherCore')
|
api project(':LauncherCore')
|
||||||
compileOnly 'io.netty:netty-codec-http:4.1.43.Final'
|
compileOnly group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty']
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':LauncherAPI')
|
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')
|
api files('../compat/authlib/authlib-clean.jar')
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
targetCompatibility = '1.8'
|
targetCompatibility = '1.8'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'org.fusesource.jansi:jansi:1.18'
|
compileOnly group: 'org.fusesource.jansi', name:'jansi', version: rootProject['verJansi']
|
||||||
compileOnly 'org.jline:jline:3.11.0'
|
compileOnly group: 'org.jline', name: 'jline', version: rootProject['verJline']
|
||||||
compileOnly 'org.jline:jline-reader:3.11.0'
|
compileOnly group: 'org.jline', name: 'jline-reader', version: rootProject['verJline']
|
||||||
compileOnly 'org.jline:jline-terminal:3.11.0'
|
compileOnly group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline']
|
||||||
compileOnly 'org.bouncycastle:bcprov-jdk15:1.46'
|
compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15', version: rootProject['verBcprov']
|
||||||
api 'com.google.code.gson:gson:2.8.5'
|
api group: 'com.google.code.gson', name: 'gson', version: rootProject['verGson']
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|
|
@ -38,7 +38,7 @@ task javadocJar(type: Jar) {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
pack project(':LauncherAuthlib')
|
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 {
|
shadowJar {
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
group = 'pro.gravit.launcher'
|
group = 'pro.gravit.launcher'
|
||||||
version = '5.1.1-SNAPSHOT'
|
version = '5.1.1-SNAPSHOT'
|
||||||
|
|
||||||
|
apply from: 'props.gradle'
|
||||||
|
|
||||||
configure(subprojects.findAll { it.name != 'modules' }) {
|
configure(subprojects.findAll { it.name != 'modules' }) {
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
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