1+ import com.vanniktech.maven.publish.AndroidMultiVariantLibrary
2+
13plugins {
24 id(" com.android.library" )
35 id(" org.jetbrains.kotlin.android" )
46 id(" maven-publish" )
7+ id(" signing" )
8+ id(" com.vanniktech.maven.publish" ) version " 0.34.0"
59}
610
7- task(" androidSourcesJar" , Jar ::class ) {
8- archiveClassifier.set(" sources" )
9- from(android.sourceSets.getByName(" main" ).java.srcDirs)
11+ mavenPublishing {
12+ if (System .getenv(" PUBLISH_STATE" ) == " Release" ) {
13+ signAllPublications()
14+ }
1015}
1116
12- afterEvaluate {
13- publishing {
14- publications {
15- create<MavenPublication >(" mavenJava" ) {
16- groupId = " com.github.awxkee"
17- artifactId = " avif-coder-coil"
18- version = " 2.0.9"
19- from(components.findByName(" release" ))
20- // artifact("androidSourcesJar")
17+ mavenPublishing {
18+ configure(
19+ AndroidMultiVariantLibrary (
20+ sourcesJar = true ,
21+ publishJavadocJar = true ,
22+ )
23+ )
24+
25+ if (System .getenv(" PUBLISH_STATE" ) == " Release" ) {
26+ coordinates(" io.github.awxkee" , " avif-coder-coil" , System .getenv(" VERSION_NAME" ) ? : " 0.0.10" )
27+ } else {
28+ coordinates(" io.github.awxkee" , " avif-coder-coil" , " 0.0.10" )
29+ }
30+
31+ pom {
32+ name.set(" AVIF Coder Coil" )
33+ description.set(" AVIF encoder/decoder plugin for coil for Android" )
34+ inceptionYear.set(" 2025" )
35+ url.set(" https://github.com/awxkee/avif-coder-coil" )
36+ licenses {
37+ license {
38+ name.set(" The Apache License, Version 2.0" )
39+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
40+ distribution.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
41+ }
42+ license {
43+ name.set(" The 3-Clause BSD License" )
44+ url.set(" https://opensource.org/license/bsd-3-clause" )
45+ description.set(" https://opensource.org/license/bsd-3-clause" )
46+ }
47+ }
48+ developers {
49+ developer {
50+ id.set(" awxkee" )
51+ name.set(" Radzivon Bartoshyk" )
52+ url.set(" https://github.com/awxkee" )
53+ 2154 }
2255 }
56+ scm {
57+ url.set(" https://github.com/awxkee/avif-coder-coil" )
58+ connection.set(
" scm:git:[email protected] :awxkee/avif-coder-coil.git" )
59+ developerConnection.set(
" scm:git:ssh://[email protected] /awxkee/avif-coder-coil.git" )
60+ }
2361 }
2462}
2563
64+ task(" androidSourcesJar" , Jar ::class ) {
65+ archiveClassifier.set(" sources" )
66+ from(android.sourceSets.getByName(" main" ).java.srcDirs)
67+ }
68+
2669android {
2770 publishing {
2871 singleVariant(" release" ) {
@@ -60,6 +103,6 @@ dependencies {
60103 testImplementation(" junit:junit:4.13.2" )
61104 androidTestImplementation(" androidx.test.ext:junit:1.1.5" )
62105 androidTestImplementation(" androidx.test.espresso:espresso-core:3.5.1" )
63- api(" io.coil-kt.coil3:coil:3.2 .0" )
106+ api(" io.coil-kt.coil3:coil:3.3 .0" )
64107 api(" com.github.awxkee:avif-coder:2.1.4" )
65108}
0 commit comments