Skip to content

Commit 9983c64

Browse files
committed
Jitpack publishing
1 parent 6c93aa4 commit 9983c64

File tree

2 files changed

+55
-3
lines changed

2 files changed

+55
-3
lines changed

AudioCoder/build.gradle.kts

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.kotlin.android)
4+
id("maven-publish")
45
}
56

67
android {
@@ -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

5263
dependencies {
@@ -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
}

gradle/libs.versions.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ android-application = { id = "com.android.application", version.ref = "agp" }
3434
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
3535
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
3636
android-library = { id = "com.android.library", version.ref = "agp" }
37-

0 commit comments

Comments
 (0)