Skip to content

Commit

Permalink
Setup jitpack release configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoy-raj committed Jul 30, 2024
1 parent 2a8c943 commit e65648e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 99 deletions.
35 changes: 1 addition & 34 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,44 +1,11 @@
import com.vanniktech.maven.publish.SonatypeHost

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.dete.kt)
alias(libs.plugins.compose.compiler) apply false

alias(libs.plugins.vaniktech.publish)
id("maven-publish")
}

mavenPublishing {

coordinates("io.github.dinoy-raj", "droid-time", "1.0.0")

pom {
name.set("Droid Time")
description.set("Relative and absolute date time formatting android library generates message corresponding to system default locale")
inceptionYear.set("2024")
url.set("https://github.com/dinoy-raj/droidTime")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("dinoy-raj")
name.set("Dinoy Raj")
url.set("https://github.com/dinoy-raj")
}
}
scm {
url.set("https://github.com/dinoy-raj/droidTime")
}
}

publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
signAllPublications()
}
74 changes: 18 additions & 56 deletions droid-time/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.dete.kt)
alias(libs.plugins.vaniktech.publish)
id("maven-publish")
}

Expand Down Expand Up @@ -43,6 +40,23 @@ detekt {
buildUponDefaultConfig = true
}

afterEvaluate {
publishing {
publications {
register<MavenPublication>("release") {
groupId = "o.github.dinoy-raj"
artifactId = "droid-time"
version = "1.0.0"

afterEvaluate {
from(components["release"])
}
}
}
}
}


dependencies {

implementation(libs.androidx.core.ktx)
Expand All @@ -53,56 +67,4 @@ dependencies {
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)

}

mavenPublishing {

coordinates("io.github.dinoy-raj", "droid-time", "1.0.0")

pom {
name.set("Droid Time")
description.set("Relative and absolute date time formatting android library generates message corresponding to system default locale")
inceptionYear.set("2024")
url.set("https://github.com/dinoy-raj/droidTime")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
repositories {

}
developers {
developer {
id.set("dinoy-raj")
name.set("Dinoy Raj")
url.set("https://github.com/dinoy-raj")
}
}
scm {
url.set("https://github.com/dinoy-raj/droidTime")
}
}

publishToMavenCentral(SonatypeHost.DEFAULT, automaticRelease = true)
signAllPublications()
}

task("testClasses"){}

publishing {
publications {
register<MavenPublication>("release") {
groupId = "io.github.dinoy-raj"
artifactId = "droid-time"
version = "1.0.0"

afterEvaluate {
from(components["release"])
}
}
}
}

}
10 changes: 1 addition & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,4 @@ android.useAndroidX=true
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

mavenCentralUsername=Kf/uD87M
mavenCentralPassword=61XQnARTad4D72ObgHKxervRgIDpOoIVXdd40kmKTa9F

signing.keyId=8CC0FBC0
signing.password=321321
signing.secretKeyRingFile=/Users/u256384/droid_secret.gpg
# thereby reducing the size of the R class for that library
4 changes: 4 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdk:
- openjdk11
before_install:
- ./scripts/prepareJitpackEnvironment.sh

0 comments on commit e65648e

Please sign in to comment.