1- group ' io.lindstrom'
2- version ' 0.29'
1+ plugins {
2+ id ' idea'
3+ id ' java-library'
4+ id ' maven-publish'
5+ id ' signing'
6+ }
7+
8+ group = ' io.lindstrom'
9+ version = ' 0.29'
310
4- apply plugin : ' idea'
5- apply plugin : ' java'
6- apply plugin : ' maven'
7- apply plugin : ' signing'
11+ java {
12+ sourceCompatibility = JavaVersion . VERSION_1_8
13+ withJavadocJar()
14+ withSourcesJar()
15+ }
816
917ext {
1018 ideaGeneratedSources = file(' build/generated/sources/annotationProcessor/java' )
@@ -15,81 +23,76 @@ idea.module {
1523 generatedSourceDirs + = ideaGeneratedSources
1624}
1725
18- sourceCompatibility = 1.8
19-
2026repositories {
2127 mavenCentral()
2228}
2329
2430dependencies {
25- compileOnly ' org.immutables:value:2.5.6 '
31+ compileOnly ' org.immutables:value:2.10.1 '
2632 annotationProcessor " org.immutables:value:2.5.6"
27- testCompile ' junit:junit:4.12'
33+ testImplementation( ' junit:junit:4.12' )
2834}
2935
30- task javadocJar (type : Jar ) {
31- classifier = ' javadoc'
32- from javadoc
36+ test {
37+ // useJUnitPlatform()
3338}
3439
35- task sourcesJar (type : Jar ) {
36- classifier = ' sources'
37- from sourceSets. main. allSource
38- }
40+ ext. isReleaseVersion = ! version. endsWith(" SNAPSHOT" )
3941
40- artifacts {
41- archives javadocJar, sourcesJar
42- }
42+ publishing {
43+ repositories {
44+ maven {
45+ def releaseRepo = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
46+ def snapshotRepo = " https://oss.sonatype.org/content/repositories/snapshots/"
4347
44- archivesBaseName = " m3u8-parser"
48+ name = " OSSRH"
49+ url = isReleaseVersion ? releaseRepo : snapshotRepo
4550
46- if (project. hasProperty(' ossrhUsername' )) {
47- signing {
48- sign configurations. archives
51+ credentials {
52+ username = findProperty(" ossrhUsername" ) ?: System . getenv(" OSSRH_USERNAME" )
53+ password = findProperty(" ossrhPassword" ) ?: System . getenv(" OSSRH_PASSWORD" )
54+ }
55+ }
4956 }
5057
51- uploadArchives {
52- repositories {
53- mavenDeployer {
54- beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
58+ publications {
59+ mavenJava(MavenPublication ) {
60+ artifactId = ' m3u8-parser'
5561
56- repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
57- authentication(userName : ossrhUsername, password : ossrhPassword)
58- }
62+ from components. java
5963
60- snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
61- authentication(userName : ossrhUsername, password : ossrhPassword)
62- }
64+ pom {
65+ groupId = ' io.lindstrom'
66+ name = ' m3u8-parser'
67+ description = ' m3u8 parser'
68+ url = ' https://github.com/carlanton/m3u8-parser'
69+ packaging = ' jar'
6370
64- pom. project {
65- name ' m3u8-parser'
66- packaging ' jar'
67- artifactId ' m3u8-parser'
68- description ' m3u8 parser'
69- url ' https://github.com/carlanton/m3u8-parser'
70-
71- scm {
72- connection ' scm:git:https://github.com/carlanton/m3u8-parser.git'
73- developerConnection ' scm:git:git@github.com:carlanton/m3u8-parser.git'
74- url ' https://github.com/carlanton/m3u8-parser.git'
71+ licenses {
72+ license {
73+ name = ' MIT License'
74+ url = ' https://github.com/carlanton/m3u8-parser/blob/master/LICENSE'
7575 }
76+ }
7677
77- licenses {
78- license {
79- name ' MIT License'
80- url ' https://github.com/carlanton/m3u8-parser/blob/master/LICENSE'
81- }
82- }
78+ scm {
79+ url = ' https://github.com/carlanton/m3u8-parser.git'
80+ connection = ' scm:git:https://github.com/carlanton/m3u8-parser.git'
81+ developerConnection = ' scm:git:git@github.com:carlanton/m3u8-parser.git'
82+ }
8383
84- developers {
85- developer {
86- id ' antonlindstrom'
87- name ' Anton Lindström'
88- email ' carlantonlindstrom@gmail.com'
89- }
84+ developers {
85+ developer {
86+ id = ' antonlindstrom'
87+ name = ' Anton Lindström'
88+ email = ' carlantonlindstrom@gmail.com'
9089 }
9190 }
9291 }
9392 }
9493 }
9594}
95+
96+ signing {
97+ sign publishing. publications. mavenJava
98+ }
0 commit comments