Skip to content

Commit c534979

Browse files
committed
[ gradle ] Add version info
1 parent fbf5f71 commit c534979

File tree

1 file changed

+16
-24
lines changed

1 file changed

+16
-24
lines changed

build.gradle

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'org.lice'
2-
version '3.2.0'
2+
version '3.2.1'
33

44
buildscript {
55
ext.kotlin_version = '1.2.10'
@@ -9,7 +9,6 @@ buildscript {
99
dependencies {
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
12-
1312
}
1413

1514
apply plugin: 'java'
@@ -24,10 +23,10 @@ repositories {
2423
}
2524

2625
sourceSets {
27-
main.kotlin.srcDirs += 'src/main/kotlin'
28-
main.java.srcDirs += 'src/main/java'
29-
test.kotlin.srcDirs += 'src/test/kotlin'
30-
test.java.srcDirs += 'src/test/java'
26+
main.kotlin.srcDirs = ['src/main/kotlin']
27+
main.java.srcDirs = ['src/main/java']
28+
test.kotlin.srcDirs = ['src/test/kotlin']
29+
test.java.srcDirs = ['src/test/java']
3130
}
3231

3332
configurations {
@@ -48,31 +47,24 @@ tasks.withType(JavaCompile) {
4847
}
4948

5049
jar {
51-
manifest { attributes 'Main-Class': 'org.lice.repl.Main' }
50+
manifest {
51+
attributes 'Main-Class': 'org.lice.repl.Main'
52+
attributes 'Implementation-Version': version
53+
attributes 'Implementation-Title': "Lice v$version"
54+
}
5255
}
5356

5457
task fatJar(type: Jar) {
55-
classifier = 'all'
56-
description 'Assembles a jar archive containing the main classes and all the dependencies.'
57-
group 'build'
58+
baseName = project.name + '-all'
5859
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
59-
manifest { attributes 'Main-Class': 'org.lice.repl.Main' }
60+
manifest {
61+
attributes 'Main-Class': 'org.lice.repl.Main'
62+
attributes 'Implementation-Version': version
63+
attributes 'Implementation-Title': "Lice v$version"
64+
}
6065
with jar
6166
}
6267

63-
task sourcesJar(type: Jar, dependsOn: classes) {
64-
classifier = 'sources'
65-
description 'Assembles a jar archive containing the source code of this project.'
66-
group 'build'
67-
from sourceSets.main.allSource
68-
}
69-
70-
artifacts {
71-
archives jar
72-
archives fatJar
73-
archives sourcesJar
74-
}
75-
7668
jacocoTestReport {
7769
reports {
7870
xml.enabled true

0 commit comments

Comments
 (0)