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