Skip to content

Commit 87fb9a8

Browse files
committed
add publishing configuration for generator and set common version number
1 parent dd0eaba commit 87fb9a8

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

build.gradle

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
buildscript {
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

1415
apply plugin: 'java'
1516
apply plugin: 'kotlin'
17+
apply plugin: 'maven-publish'
1618

1719
sourceCompatibility = 1.8
1820

@@ -36,4 +38,24 @@ compileKotlin {
3638
}
3739
compileTestKotlin {
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
}

declarations/build.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version '0.1'
1+
version publish_version
22

33
buildscript {
44
repositories {
@@ -28,13 +28,12 @@ task sourceJar(type: Jar) {
2828
from sourceSets.main.kotlin
2929
}
3030

31-
3231
publishing {
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

0 commit comments

Comments
 (0)