-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
64 lines (56 loc) · 1.64 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
buildscript {
ext.kotlin_version = '1.0.6'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '1.2.4'
}
apply plugin: "kotlin"
project.version = '1.3'
project.group = 'me.nallar'
// Extended project information
ext.projectName = 'JarOpener'
ext.inceptionYear = '2016'
ext.packaging = 'jar'
ext.url = 'https://github.com/nallar/JarOpener'
ext.description = 'Opens up jar files for easy monkey-patching'
ext.organization = 'nallar.me'
ext.mainClassName = "me.nallar.JarOpener"
// Define variables
ext.buildNumber = System.getenv("BUILD_NUMBER") ?: 0
ext.ciSystem = System.getenv("JENKINS_URL") ? 'Jenkins' : 'unknown'
ext.commit = System.getenv("GIT_COMMIT") ?: 'unknown'
repositories {
jcenter()
maven { url='http://repo.nallar.me/' }
}
configurations {
provided
compile.extendsFrom provided
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'me.nallar:JavaTransformer:1.3'
}
jar {
baseName = project.name
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from((configurations.runtime - configurations.provided).filter { it.exists() }.collect {
it.isDirectory() ? it : zipTree(it)
}) {
exclude "META-INF/**"
}
}
jar.manifest.mainAttributes(
"Main-Class": mainClassName,
"Built-By": System.properties['user.name'],
"Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
"Implementation-Title": name,
"Implementation-Version": version + "+" + ciSystem + "-b" + buildNumber + ".git-" + commit,
"Implementation-Vendor": url)