1+ import com.vanniktech.maven.publish.SonatypeHost
12import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
23
34plugins {
@@ -8,7 +9,7 @@ plugins {
89 alias(libs.plugins.composeCompiler)
910 alias(libs.plugins.composeHotReload)
1011 id(" maven-publish" )
11- alias(libs.plugins .maven.publish)
12+ id( " com.vanniktech .maven.publish" ) version " 0.30.0 "
1213}
1314
1415kotlin {
@@ -42,7 +43,7 @@ kotlin {
4243 iosSimulatorArm64()
4344 ).forEach { iosTarget ->
4445 iosTarget.binaries.framework {
45- baseName = " ChitralekhanKit "
46+ baseName = " chitralekhanKit "
4647 }
4748 }
4849
@@ -79,110 +80,44 @@ compose.resources {
7980}
8081
8182
82- //
83- // android {
84- // namespace = "com.daiatech.chitralekhan"
85- // compileSdk = 35
86- //
87- // defaultConfig {
88- // minSdk = 21
89- // testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
90- // consumerProguardFiles("consumer-rules.pro")
91- // }
92- //
93- // buildTypes {
94- // release {
95- // isMinifyEnabled = false
96- // proguardFiles(
97- // getDefaultProguardFile("proguard-android-optimize.txt"),
98- // "proguard-rules.pro"
99- // )
100- // }
101- // }
102- // compileOptions {
103- // sourceCompatibility = JavaVersion.VERSION_17
104- // targetCompatibility = JavaVersion.VERSION_17
105- // }
106- //
107- // kotlinOptions.jvmTarget = "17"
108- // buildFeatures.compose = true
109- //
110- // publishing {
111- // singleVariant("release") {
112- // withSourcesJar()
113- // }
114- // }
115- // }
116- //
117- // dependencies {
118- //
119- // implementation(libs.androidx.core.ktx)
120- // implementation(libs.androidx.lifecycle.runtime.ktx)
121- // implementation(libs.androidx.activity.compose)
122- // implementation(libs.androidx.appcompat)
123- //
124- // implementation(platform(libs.androidx.compose.bom))
125- // implementation(libs.androidx.ui)
126- // implementation(libs.androidx.ui.graphics)
127- // implementation(libs.androidx.ui.tooling.preview)
128- // implementation(libs.androidx.material3)
129- // debugImplementation(libs.androidx.ui.tooling)
130- //
131- // implementation(libs.kotlinx.serialization.json)
132- // }
133- //
134- // // Publishing tasks
135- // val publishGroupId = "io.github.karya-inc"
136- // val publishArtifactVersion = "0.0.4"
137- // val publishArtifactId = "chitralekhan"
138- //
139- // group = publishGroupId
140- // version = version
141- //
142- // publishing {
143- // publications {
144- // create<MavenPublication>("release") {
145- // groupId = publishGroupId
146- // artifactId = publishArtifactId
147- // version = publishArtifactVersion
148- //
149- // afterEvaluate { from(components["release"]) }
150- //
151- // pom {
152- // name.set(publishArtifactId)
153- // description.set("An Android library for image annotationo")
154- // url.set("https://github.com/karya-inc/ChitraLekhan.git")
155- //
156- // licenses {
157- // license {
158- // name.set("GNU license")
159- // url.set("https://opensource.org/license/gpl-3-0")
160- // }
161- // }
162- //
163- // developers {
164- // developer {
165- // id.set("divyansh@karya.in")
166- // name.set("Divyansh Kushwaha")
167- // email.set("divyansh@karya.in")
168- // }
169- // }
170- //
171- // scm {
172- // connection.set("scm:git:ssh://git@github.com/karya-inc/ChitraLekhan.git")
173- // developerConnection.set("scm:git:ssh://git@github.com/karya-inc/ChitraLekhan.git")
174- // url.set("https://github.com/karya-inc/ChitraLekhan.git")
175- // }
176- // }
177- // }
178- // }
179- // }
180- //
181- // signing {
182- // useInMemoryPgpKeys(
183- // rootProject.ext["signing.keyId"] as String,
184- // rootProject.ext["signing.key"] as String,
185- // rootProject.ext["signing.password"] as String
186- // )
187- // sign(publishing.publications)
188- // }
83+ group = " io.github.karya-inc"
84+ version = " 0.0.4"
85+
86+ mavenPublishing {
87+ val artifactId = " chitralekhan"
88+ publishToMavenCentral(SonatypeHost .CENTRAL_PORTAL )
89+ signAllPublications()
90+
91+ coordinates(
92+ groupId = group.toString(),
93+ artifactId = artifactId,
94+ version = version.toString()
95+ )
96+
97+ pom {
98+ name.set(artifactId)
99+ description.set(" An Android library for image annotation" )
100+ url.set(" https://github.com/karya-inc/ChitraLekhan.git" )
101+
102+ licenses {
103+ license {
104+ name.set(" GNU license" )
105+ url.set(" https://opensource.org/license/gpl-3-0" )
106+ }
107+ }
108+
109+ developers {
110+ developer {
111+ id.set(" divyansh@karya.in" )
112+ name.set(" Divyansh Kushwaha" )
113+ email.set(" divyansh@karya.in" )
114+ }
115+ }
116+
117+ scm {
118+ connection.set(" scm:git:ssh://git@github.com/karya-inc/ChitraLekhan.git" )
119+ developerConnection.set(" scm:git:ssh://git@github.com/karya-inc/ChitraLekhan.git" )
120+ url.set(" https://github.com/karya-inc/ChitraLekhan.git" )
121+ }
122+ }
123+ }
0 commit comments