mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Обновил gradle.
This commit is contained in:
parent
ec5c076a16
commit
ca8f6f0861
10 changed files with 45 additions and 37 deletions
|
@ -8,7 +8,7 @@
|
|||
url "https://oss.sonatype.org/content/repositories/snapshots"
|
||||
}
|
||||
maven {
|
||||
url "http://maven.geomajas.org/"
|
||||
url "https://maven.geomajas.org/"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
launch4j
|
||||
launch4jCJ
|
||||
bundleOnly.extendsFrom bundle
|
||||
compile.extendsFrom bundle, hikari, pack, launch4jCJ, launch4j
|
||||
api.extendsFrom bundle, hikari, pack, launch4jCJ, launch4j
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -114,15 +114,17 @@ pack project(':LauncherAPI')
|
|||
compileOnlyA 'com.google.guava:guava:26.0-jre'
|
||||
compileOnlyA 'log4j:log4j:1.2.17' // Do not update (laggy dep).
|
||||
compileOnlyA 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
testCompile 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
}
|
||||
|
||||
task hikari(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
into "$buildDir/libs/libraries/hikaricp"
|
||||
from configurations.hikari
|
||||
}
|
||||
|
||||
task launch4jM(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
into "$buildDir/libs/libraries/launch4j"
|
||||
from(configurations.launch4jCJ.collect { it.isDirectory() ? it : zipTree(it) })
|
||||
includeEmptyDirs false
|
||||
|
@ -139,6 +141,7 @@ task launch4jM(type: Copy) {
|
|||
}
|
||||
|
||||
task launch4jA(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
into "$buildDir/libs/libraries/launch4j"
|
||||
from(configurations.launch4j)
|
||||
includeEmptyDirs false
|
||||
|
@ -151,17 +154,20 @@ task launch4jA(type: Copy) {
|
|||
}
|
||||
|
||||
task dumpLibs(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA
|
||||
into "$buildDir/libs/libraries"
|
||||
from configurations.bundleOnly
|
||||
}
|
||||
|
||||
task dumpCompileOnlyLibs(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
into "$buildDir/libs/launcher-libraries-compile"
|
||||
from configurations.compileOnlyA
|
||||
}
|
||||
|
||||
task bundle(type: Zip) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
dependsOn parent.childProjects.Launcher.tasks.build, tasks.dumpLibs, tasks.dumpCompileOnlyLibs, tasks.jar
|
||||
archiveName 'LaunchServer.zip'
|
||||
destinationDir file("$buildDir")
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
plugins {
|
||||
id 'org.openjfx.javafxplugin' version '0.0.5'
|
||||
}
|
||||
apply plugin: 'org.openjfx.javafxplugin'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
String mainClassName = "pro.gravit.launcher.ClientLauncherWrapper"
|
||||
|
@ -8,7 +6,7 @@
|
|||
|
||||
repositories {
|
||||
maven {
|
||||
url "http://repo.spring.io/plugins-release/"
|
||||
url "https://repo.spring.io/plugins-release/"
|
||||
}
|
||||
}
|
||||
javafx {
|
||||
|
@ -21,7 +19,7 @@
|
|||
configurations {
|
||||
bundle
|
||||
pack
|
||||
compile.extendsFrom bundle, pack
|
||||
api.extendsFrom bundle, pack
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -45,6 +43,7 @@ task javadocJar(type: Jar) {
|
|||
}
|
||||
|
||||
shadowJar {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
classifier = null
|
||||
relocate 'org.objectweb.asm', 'pro.gravit.repackage.org.objectweb.asm'
|
||||
relocate 'io.netty', 'pro.gravit.repackage.io.netty'
|
||||
|
@ -60,12 +59,14 @@ pack project(':LauncherAPI')
|
|||
}
|
||||
|
||||
task genRuntimeJS(type: Zip) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
archiveName = "runtime.zip"
|
||||
destinationDir = file("${buildDir}/tmp")
|
||||
from "runtime/"
|
||||
}
|
||||
|
||||
task dumpLibs(type: Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
into "$buildDir/libs/libraries"
|
||||
from configurations.bundle
|
||||
}
|
||||
|
|
|
@ -59,15 +59,9 @@ public static void checkClass(Class<?> clazz) throws SecurityException {
|
|||
public static void exitLauncher(int code)
|
||||
{
|
||||
modulesManager.invokeEvent(new ClientExitPhase(code));
|
||||
try {
|
||||
System.exit(code);
|
||||
} catch (Exception e) //Forge Security Manager?
|
||||
{
|
||||
NativeJVMHalt.haltA(code);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String... args) throws Throwable {
|
||||
JVMHelper.checkStackTrace(LauncherEngine.class);
|
||||
JVMHelper.verifySystemProperties(Launcher.class, true);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodType;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
import java.util.Vector;
|
||||
|
||||
|
@ -87,7 +88,8 @@ private static byte[] gen(final String name, final String exName) { // "cpw/mods
|
|||
}
|
||||
|
||||
public static String randomStr(final int lenght) {
|
||||
final String alphabet = "abcdefghijklmnopqrstuvwxyz";
|
||||
String alphabet = "abcdefghijklmnopqrstuvwxyz";
|
||||
alphabet += alphabet.toUpperCase(Locale.US);
|
||||
final StringBuilder sb = new StringBuilder(lenght);
|
||||
final Random random = SecurityHelper.newRandom();
|
||||
for (int i = 0; i < lenght; i++)
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
targetCompatibility = '1.8'
|
||||
|
||||
dependencies {
|
||||
compile project(':LauncherCore')
|
||||
api project(':LauncherCore')
|
||||
compileOnly 'io.netty:netty-codec-http:4.1.43.Final'
|
||||
testCompile 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
targetCompatibility = '1.8'
|
||||
|
||||
dependencies {
|
||||
compile project(':LauncherAPI')
|
||||
api project(':LauncherAPI')
|
||||
compileOnly 'com.google.guava:guava:26.0-jre'
|
||||
compile files('../compat/authlib/authlib-clean.jar')
|
||||
api files('../compat/authlib/authlib-clean.jar')
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
apply plugin: 'java-library'
|
||||
sourceCompatibility = '1.8'
|
||||
targetCompatibility = '1.8'
|
||||
|
||||
|
@ -8,8 +7,8 @@
|
|||
compileOnly 'org.jline:jline-reader:3.11.0'
|
||||
compileOnly 'org.jline:jline-terminal:3.11.0'
|
||||
compileOnly 'org.bouncycastle:bcprov-jdk15:1.46'
|
||||
compile 'com.google.code.gson:gson:2.8.5'
|
||||
testCompile 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
api 'com.google.code.gson:gson:2.8.5'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
configurations {
|
||||
pack
|
||||
compile.extendsFrom pack
|
||||
api.extendsFrom pack
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "http://repo.spring.io/plugins-release/"
|
||||
url "https://repo.spring.io/plugins-release/"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ pack project(':LauncherAuthlib')
|
|||
}
|
||||
|
||||
shadowJar {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
classifier = null
|
||||
relocate 'io.netty', 'pro.gravit.repackage.io.netty'
|
||||
configurations = [project.configurations.pack]
|
||||
|
|
27
build.gradle
27
build.gradle
|
@ -1,7 +1,8 @@
|
|||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '5.0.0' apply false
|
||||
id 'com.github.johnrengelman.shadow' version '5.2.0' apply false
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
id 'org.openjfx.javafxplugin' version '0.0.7' apply false
|
||||
}
|
||||
group = 'pro.gravit.launcher'
|
||||
version = '5.1.1-SNAPSHOT'
|
||||
|
@ -10,30 +11,34 @@
|
|||
apply plugin: 'idea'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'java-library'
|
||||
|
||||
|
||||
group = 'pro.gravit'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'http://oss.sonatype.org/content/groups/public' }
|
||||
maven { url 'https://oss.sonatype.org/content/groups/public' }
|
||||
maven {
|
||||
url "http://clojars.org/repo/"
|
||||
url "https://clojars.org/repo/"
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
apt
|
||||
aptCompileOnly
|
||||
aptOnly
|
||||
aptOnly.extendsFrom apt, aptCompileOnly
|
||||
compile.extendsFrom apt
|
||||
compileOnly.extendsFrom aptCompileOnly
|
||||
jar {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
}
|
||||
|
||||
eclipse {
|
||||
classpath {
|
||||
plusConfigurations += [ configurations.compileOnly ]
|
||||
downloadSources = true
|
||||
downloadJavadoc = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||
options.annotationProcessorPath = configurations.aptOnly
|
||||
options.incremental = true // one flag, and things will get MUCH faster
|
||||
}
|
||||
}
|
||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit c5952e71d96b2b02bdaee4e415fd60a844c85876
|
||||
Subproject commit 559820852c231b7045b2c12fabbde1261485a75e
|
Loading…
Reference in a new issue