From fef5eac0859de7871e57f72953401f9adcee06bc Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 22 Aug 2019 14:36:50 +0700 Subject: [PATCH 1/4] =?UTF-8?q?[FIX]=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D0=BA=D1=80=D0=B8?= =?UTF-8?q?=D0=BF=D1=82=D0=BE=D0=B2=20=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8=20=D0=B2=20Maven?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LaunchServer/build.gradle | 16 +++++++++++++++- Launcher/build.gradle | 16 +++++++++++++++- LauncherAPI/build.gradle | 16 +++++++++++++++- LauncherCore/build.gradle | 16 +++++++++++++++- .../src/main/java/pro/gravit/utils/Version.java | 4 ++-- build.gradle | 2 +- 6 files changed, 63 insertions(+), 7 deletions(-) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 8e69ee4a..21ba8d29 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -167,7 +167,9 @@ task dumpClientLibs(type: Copy) { publications { launchserverapi(MavenPublication) { artifactId = 'launchserver-api' - artifact cleanjar + artifact(cleanjar) { + classifier "" + } pom { name = 'GravitLauncher LaunchServer API' description = 'GravitLauncher LaunchServer Module API' @@ -178,6 +180,18 @@ task dumpClientLibs(type: Copy) { url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } + } scm { connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 8c40adc7..f8dfa291 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -62,7 +62,9 @@ task dumpLibs(type: Copy) { publications { launcherclientapi(MavenPublication) { artifactId = 'launcher-client-api' - artifact jar + artifact(jar) { + classifier "" + } pom { name = 'GravitLauncher Client API' description = 'GravitLauncher Client Module API' @@ -73,6 +75,18 @@ task dumpLibs(type: Copy) { url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } + } scm { connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index e246c6e8..2bb9b8fc 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -15,7 +15,9 @@ compile project(':LauncherCore') publications { launcherwsapi(MavenPublication) { artifactId = 'launcher-ws-api' - artifact jar + artifact(jar) { + classifier "" + } pom { name = 'GravitLauncher WebSocket API' description = 'GravitLauncher WebSocket Module API' @@ -26,6 +28,18 @@ compile project(':LauncherCore') url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } + } scm { connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' diff --git a/LauncherCore/build.gradle b/LauncherCore/build.gradle index 26e815e4..d6889951 100644 --- a/LauncherCore/build.gradle +++ b/LauncherCore/build.gradle @@ -17,7 +17,9 @@ publications { launchercore(MavenPublication) { artifactId = 'launcher-core' - artifact jar + artifact(jar) { + classifier "" + } pom { name = 'GravitLauncher Core Utils' description = 'GravitLauncher Core Utils' @@ -28,6 +30,18 @@ url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } + } scm { connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index abf86875..96667473 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -22,9 +22,9 @@ public final class Version { public final Type release; public static final int MAJOR = 5; public static final int MINOR = 0; - public static final int PATCH = 6; + public static final int PATCH = 7; public static final int BUILD = 1; - public static final Version.Type RELEASE = Version.Type.STABLE; + public static final Version.Type RELEASE = Version.Type.DEV; @LauncherAPI public Version(int major, int minor, int patch) { diff --git a/build.gradle b/build.gradle index 1c6579f2..e06ea52b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ id 'signing' } group = 'pro.gravit.launcher' -version = '5.0.6' +version = '5.0.7-SNAPSHOT' configure(subprojects.findAll { it.name != 'modules' }) { apply plugin: 'idea' From f087cc528213a6706542def812f2b55faa640a79 Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 22 Aug 2019 14:49:50 +0700 Subject: [PATCH 2/4] [FIX] GitLab CI --- .gitlab-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 885fad99..82eac9f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ before_script: - apt-get update -qq && apt-get install -y -qq git git-core cache: + key: ${CI_COMMIT_REF_NAME} paths: - .gradle/wrapper - .gradle/caches @@ -22,10 +23,14 @@ build: - git submodule sync - git submodule update --init --recursive - ./gradlew assemble + - mv LaunchServer/build/libs/*.jar LaunchServer + - mv ServerWrapper/build/libs/*.jar ServerWrapper + - mv modules/*_module/build/libs/*.jar modules artifacts: paths: - - LaunchServer/build/libs/* - - ServerWrapper/build/libs/*.jar + - LaunchServer/*.jar + - ServerWrapper/*.jar + - modules/*.jar expire_in: 1 week after_script: From 19b5aabc82c29765c22aece7006c1fc6ada4a2c2 Mon Sep 17 00:00:00 2001 From: Egor Koleda Date: Thu, 22 Aug 2019 11:04:17 +0000 Subject: [PATCH 3/4] Fix type signatures --- .../launchserver/binary/JAConfigurator.java | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java index 0451767e..5f96705d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java @@ -22,32 +22,32 @@ import pro.gravit.launchserver.asm.SafeClassWriter; public class JAConfigurator { - private static final String modulesManagerName = Type.getInternalName(ModulesManager.class); - private static final String registerModDesc = Type.getMethodDescriptor(Type.VOID_TYPE, Type.getType(Module.class)); - private static final String autoGenConfigName = Type.getInternalName(AutogenConfig.class); - private static final String stringName = Type.getInternalName(String.class); - private final ClassNode configclass; - private final MethodNode constructor; - private final MethodNode initModuleMethod; + private static final String modulesManagerName = Type.getInternalName(ModulesManager.class); + private static final String registerModDesc = Type.getMethodDescriptor(Type.VOID_TYPE, Type.getType(Module.class)); + private static final String autoGenConfigName = Type.getInternalName(AutogenConfig.class); + private static final String stringDesc = Type.getDescriptor(String.class); + private final ClassNode configclass; + private final MethodNode constructor; + private final MethodNode initModuleMethod; public JAConfigurator(ClassNode configclass) { - this.configclass = configclass; - constructor = configclass.methods.stream().filter(e -> "".equals(e.name)).findFirst().get(); - constructor.instructions = new InsnList(); + this.configclass = configclass; + constructor = configclass.methods.stream().filter(e -> "".equals(e.name)).findFirst().get(); + constructor.instructions = new InsnList(); initModuleMethod = configclass.methods.stream().filter(e -> "initModules".equals(e.name)).findFirst().get(); initModuleMethod.instructions = new InsnList(); } public void addModuleClass(String fullName) { - initModuleMethod.instructions.insert(new MethodInsnNode(Opcodes.INVOKEINTERFACE, modulesManagerName, "registerModule", registerModDesc)); - initModuleMethod.instructions.insert(new MethodInsnNode(Opcodes.INVOKESPECIAL, fullName.replace('.', '/'), "", "()V")); - initModuleMethod.instructions.insert(new TypeInsnNode(Opcodes.NEW, fullName.replace('.', '/'))); + initModuleMethod.instructions.insert(new MethodInsnNode(Opcodes.INVOKEINTERFACE, modulesManagerName, "registerModule", registerModDesc)); + initModuleMethod.instructions.insert(new MethodInsnNode(Opcodes.INVOKESPECIAL, fullName.replace('.', '/'), "", "()V")); + initModuleMethod.instructions.insert(new TypeInsnNode(Opcodes.NEW, fullName.replace('.', '/'))); } public byte[] getBytecode(ClassMetadataReader reader) { ClassWriter cw = new SafeClassWriter(reader, ClassWriter.COMPUTE_FRAMES); configclass.accept(cw); - return cw.toByteArray(); + return cw.toByteArray(); } public String getZipEntryPath() { @@ -55,41 +55,41 @@ public String getZipEntryPath() { } public void setAddress(String address) { - constructor.instructions.add(new LdcInsnNode(address)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "address", stringName)); + constructor.instructions.add(new LdcInsnNode(address)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "address", stringDesc)); } public void setProjectName(String name) { - constructor.instructions.add(new LdcInsnNode(name)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "projectname", stringName)); + constructor.instructions.add(new LdcInsnNode(name)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "projectname", stringDesc)); } public void setSecretKey(String key) { - constructor.instructions.add(new LdcInsnNode(key)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "secretKeyClient", stringName)); + constructor.instructions.add(new LdcInsnNode(key)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "secretKeyClient", stringDesc)); } public void setOemUnlockKey(String key) { constructor.instructions.add(new LdcInsnNode(key)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "oemUnlockKey", stringName)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "oemUnlockKey", stringDesc)); } public void setGuardType(String key) { constructor.instructions.add(new LdcInsnNode(key)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardType", stringName)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardType", stringDesc)); } - public void push(final int value) { - if (value >= -1 && value <= 5) - constructor.instructions.add(new InsnNode(Opcodes.ICONST_0 + value)); - else if (value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE) - constructor.instructions.add(new IntInsnNode(Opcodes.BIPUSH, value)); - else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE) - constructor.instructions.add(new IntInsnNode(Opcodes.SIPUSH, value)); - else - constructor.instructions.add(new LdcInsnNode(value)); - } + public void push(final int value) { + if (value >= -1 && value <= 5) + constructor.instructions.add(new InsnNode(Opcodes.ICONST_0 + value)); + else if (value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE) + constructor.instructions.add(new IntInsnNode(Opcodes.BIPUSH, value)); + else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE) + constructor.instructions.add(new IntInsnNode(Opcodes.SIPUSH, value)); + else + constructor.instructions.add(new LdcInsnNode(value)); + } public void setEnv(LauncherConfig.LauncherEnvironment env) { int i = 2; @@ -124,19 +124,19 @@ public void setWarningMissArchJava(boolean b) { public void setGuardLicense(String name, String key, String encryptKey) { constructor.instructions.add(new LdcInsnNode(name)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseName", stringName)); - constructor.instructions.add(new LdcInsnNode(key)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseKey", stringName)); - constructor.instructions.add(new LdcInsnNode(encryptKey)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseEncryptKey", stringName)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseName", stringDesc)); + constructor.instructions.add(new LdcInsnNode(key)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseKey", stringDesc)); + constructor.instructions.add(new LdcInsnNode(encryptKey)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseEncryptKey", stringDesc)); } public void nullGuardLicense() { constructor.instructions.add(new InsnNode(Opcodes.ACONST_NULL)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseName", stringName)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseName", stringDesc)); constructor.instructions.add(new InsnNode(Opcodes.ACONST_NULL)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseKey", stringName)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseKey", stringDesc)); constructor.instructions.add(new InsnNode(Opcodes.ACONST_NULL)); - constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseEncryptKey", stringName)); + constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, autoGenConfigName, "guardLicenseEncryptKey", stringDesc)); } } From bcbabc45989ce4073c8781104209f0c675850fd6 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Thu, 22 Aug 2019 14:30:22 +0300 Subject: [PATCH 4/4] =?UTF-8?q?[FIX]=20TAB=D1=8B=20=D0=B2=20=D1=81=D0=BA?= =?UTF-8?q?=D1=80=D0=B8=D0=BF=D1=82=D0=B0=D1=85=20=D0=B3=D1=80=D0=B0=D0=B4?= =?UTF-8?q?=D0=BB.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LaunchServer/build.gradle | 22 +++++++++++----------- Launcher/build.gradle | 22 +++++++++++----------- LauncherAPI/build.gradle | 22 +++++++++++----------- LauncherCore/build.gradle | 22 +++++++++++----------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 21ba8d29..295cc8f0 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -180,17 +180,17 @@ task dumpClientLibs(type: Copy) { url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } - developers { - developer { - id = 'gravit' - name = 'Gravit' - email = 'gravit.min@ya.ru' - } - developer { - id = 'zaxar163' - name = 'Zaxar163' - email = 'zahar.vcherachny@yandex.ru' - } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } } scm { diff --git a/Launcher/build.gradle b/Launcher/build.gradle index f8dfa291..2c56ea69 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -75,17 +75,17 @@ task dumpLibs(type: Copy) { url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } - developers { - developer { - id = 'gravit' - name = 'Gravit' - email = 'gravit.min@ya.ru' - } - developer { - id = 'zaxar163' - name = 'Zaxar163' - email = 'zahar.vcherachny@yandex.ru' - } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } } scm { connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index 2bb9b8fc..734e878a 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -28,17 +28,17 @@ compile project(':LauncherCore') url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } - developers { - developer { - id = 'gravit' - name = 'Gravit' - email = 'gravit.min@ya.ru' - } - developer { - id = 'zaxar163' - name = 'Zaxar163' - email = 'zahar.vcherachny@yandex.ru' - } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } } scm { connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' diff --git a/LauncherCore/build.gradle b/LauncherCore/build.gradle index d6889951..dfb4e882 100644 --- a/LauncherCore/build.gradle +++ b/LauncherCore/build.gradle @@ -30,17 +30,17 @@ url = 'https://www.gnu.org/licenses/gpl-3.0.html' } } - developers { - developer { - id = 'gravit' - name = 'Gravit' - email = 'gravit.min@ya.ru' - } - developer { - id = 'zaxar163' - name = 'Zaxar163' - email = 'zahar.vcherachny@yandex.ru' - } + developers { + developer { + id = 'gravit' + name = 'Gravit' + email = 'gravit.min@ya.ru' + } + developer { + id = 'zaxar163' + name = 'Zaxar163' + email = 'zahar.vcherachny@yandex.ru' + } } scm { connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git'