File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 11buildscript {
22 ext. kotlin_version = ' 1.2.0'
3+ ext. publish_version = 0.1
34
45 repositories {
56 jcenter()
@@ -9,10 +10,11 @@ buildscript {
910 }
1011}
1112
12- version ' 1.0-SNAPSHOT '
13+ version publish_version
1314
1415apply plugin : ' java'
1516apply plugin : ' kotlin'
17+ apply plugin : ' maven-publish'
1618
1719sourceCompatibility = 1.8
1820
@@ -36,4 +38,24 @@ compileKotlin {
3638}
3739compileTestKotlin {
3840 kotlinOptions. jvmTarget = " 1.8"
41+ }
42+
43+ task sourceJar (type : Jar ) {
44+ from sourceSets. main. kotlin
45+ }
46+
47+ publishing {
48+ publications {
49+ maven(MavenPublication ) {
50+ groupId ' de.rakhman.webextensions-declarations'
51+ artifactId ' webextensions-declarations-generator'
52+ version publish_version
53+
54+ from components. java
55+
56+ artifact sourceJar {
57+ classifier " sources"
58+ }
59+ }
60+ }
3961}
Original file line number Diff line number Diff line change 1- version ' 0.1 '
1+ version publish_version
22
33buildscript {
44 repositories {
@@ -28,13 +28,12 @@ task sourceJar(type: Jar) {
2828 from sourceSets. main. kotlin
2929}
3030
31-
3231publishing {
3332 publications {
3433 maven(MavenPublication ) {
3534 groupId ' de.rakhman.webextensions-declarations'
3635 artifactId ' webextensions-declarations'
37- version ' 1.0 '
36+ version publish_version
3837
3938 from components. java
4039
You can’t perform that action at this time.
0 commit comments