11plugins {
22 alias(libs.plugins.android.library)
33 alias(libs.plugins.kotlin.android)
4+ id(" maven-publish" )
45}
56
67android {
@@ -44,9 +45,19 @@ android {
4445 sourceCompatibility = JavaVersion .VERSION_11
4546 targetCompatibility = JavaVersion .VERSION_11
4647 }
48+
4749 kotlinOptions {
4850 jvmTarget = " 11"
4951 }
52+
53+ // JitPack publishing
54+ publishing {
55+ singleVariant(" release" ) {
56+ // Include sources and javadoc for better developer experience
57+ withSourcesJar()
58+ withJavadocJar()
59+ }
60+ }
5061}
5162
5263dependencies {
@@ -55,9 +66,51 @@ dependencies {
5566 implementation(libs.androidx.appcompat)
5667 implementation(libs.material)
5768
58-
59-
6069 testImplementation(libs.junit)
6170 androidTestImplementation(libs.androidx.junit)
6271 androidTestImplementation(libs.androidx.espresso.core)
72+ }
73+
74+ // JitPack publishing configuration
75+ afterEvaluate {
76+ configure<PublishingExtension > {
77+ publications {
78+ create<MavenPublication >(" release" ) {
79+ from(components[" release" ])
80+
81+ // Set the Maven coordinates
82+ groupId = " com.github.OperatorFoundation"
83+ artifactId = " AudioCoderAndroid"
84+ version = " 1.0-SNAPSHOT" // This will be overridden by JitPack
85+
86+ // Add metadata for better Maven repository experience
87+ pom {
88+ name.set(" AudioCoder Android Library" )
89+ description.set(" Android library for audio coding functionality with WSPR support" )
90+ url.set(" https://github.com/OperatorFoundation/AudioCoderAndroid" )
91+
92+ licenses {
93+ license {
94+ name.set(" MIT License" )
95+ url.set(" https://opensource.org/licenses/MIT" )
96+ }
97+ }
98+
99+ developers {
100+ developer {
101+ id.set(" OperatorFoundation" )
102+ name.set(" Operator Foundation" )
103+ url.set(" https://github.com/OperatorFoundation" )
104+ }
105+ }
106+
107+ scm {
108+ connection.set(" scm:git:git://github.com/OperatorFoundation/AudioCoderAndroid.git" )
109+ developerConnection.set(" scm:git:ssh://github.com:OperatorFoundation/AudioCoderAndroid.git" )
110+ url.set(" https://github.com/OperatorFoundation/AudioCoderAndroid/tree/main" )
111+ }
112+ }
113+ }
114+ }
115+ }
63116}
0 commit comments