forked from FabricMC/fabric-installer
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
103 lines (89 loc) · 2.46 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.0.0'
classpath 'edu.sc.seis.gradle:launch4j:2.4.4'
classpath "com.github.ben-manes:gradle-versions-plugin:0.21.0"
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'edu.sc.seis.launch4j'
apply plugin: "com.github.ben-manes.versions"
sourceCompatibility = 1.8
version = '1.1.0'
archivesBaseName = "legacy-installer"
// Fetch build number from Jenkins
def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {
version = version + "." + "${System.getenv().BUILD_NUMBER}"
}
repositories {
mavenCentral()
maven {
name = 'fabric'
url = 'https://maven.fabricmc.net/'
}
}
dependencies {
compile 'com.google.code.gson:gson:2.8.5'
implementation 'com.formdev:flatlaf:1.0'
testCompile 'junit:junit:4.12'
}
shadowJar {
relocate 'com.google', 'io.github.minecraftcursedlegacy.installer.repackage.com.google'
minimize {
exclude(dependency('com.formdev:flatlaf:.*'))
}
classifier = null
}
build.dependsOn shadowJar
jar {
manifest {
attributes 'Implementation-Title': 'FabricInstaller',
'Implementation-Version': version,
'Main-Class': 'io.github.minecraftcursedlegacy.installer.Main'
}
enabled = false
}
launch4j {
mainClassName = 'io.github.minecraftcursedlegacy.installer.Main'
icon = "${projectDir}/src/main/resources/icon.ico"
outfile = "${archivesBaseName}-${project.version}.exe"
productName = 'Fabric installer'
companyName = "Fabric Team"
copyright = "Apache License Version 2.0"
manifest = "${projectDir}/l4j-manifest.xml" // https://docs.microsoft.com/en-us/windows/desktop/sbscs/application-manifests This helps with
}
tasks.build.dependsOn 'launch4j'
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle'
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
artifact (file("${projectDir}/build/launch4j/${archivesBaseName}-${project.version}.exe"))
artifact (jar)
}
}
repositories {
maven {
url "http://mavenupload.modmuss50.me/"
if (project.hasProperty('mavenPass')) {
credentials {
username 'buildslave'
password project.getProperty('mavenPass')
}
}
}
}
}