-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
133 lines (115 loc) · 2.86 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
group 'org.lice'
version '3.3.2'
buildscript {
ext.kotlin_version = '1.2.41'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'jacoco'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
sourceSets {
main.kotlin.srcDirs = ['src/main/kotlin']
main.java.srcDirs = []
main.resources.srcDirs = ['src/main/resources']
test.kotlin.srcDirs = ['src/test/kotlin', 'src/test/java']
test.java.srcDirs = ['src/test/java']
}
configurations {
library
}
dependencies {
compile group: 'org.jetbrains', name: 'annotations', version: '16.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
configurations.compile.extendsFrom(configurations.library)
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}
bintray {
user = "ice1000"
key = findProperty("key").toString()
configurations = ["archives"]
pkg {
name = project.name
repo = "Lice"
githubRepo = "lice-lang/lice"
publicDownloadNumbers = true
vcsUrl = "https://github.com/lice-lang/lice.git"
version {
name = project.version
vcsTag = "v$project.version"
websiteUrl = "https://github.com/lice-lang/lice/releases/tag/$vcsTag"
}
}
}
publishing {
publications {
mavenJava(MavenPublication.class) {
from components.java
groupId = group
artifactId = project.name
version = project.version
artifact sourcesJar
pom.withXml {
def root = asNode()
root.appendNode("description", "A multi-paradigm programming language running on JVM")
root.appendNode("name", project.name)
root.children().last()
}
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
mainClassName = 'org.lice.repl.Main'
jar {
manifest {
attributes 'Main-Class': mainClassName
attributes 'Implementation-Version': version
attributes 'Implementation-Title': "Lice v$version"
}
}
task fatJar(type: Jar) {
classifier = 'all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': 'org.lice.repl.Main'
attributes 'Implementation-Version': version
attributes 'Implementation-Title': "Lice v$version"
}
with jar
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
description 'Assembles a jar archive containing the source code of this project.'
group 'build'
from sourceSets.main.allSource
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
check.dependsOn jacocoTestReport
artifacts {
archives jar
archives fatJar
archives sourcesJar
}