-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publishing to new maven central (#197)
* Removing old code1 * Bumping name and change package name * configuring publish script * Changing secrets * Changing assemble to assembleRelease --------- Co-authored-by: CI Bot <[email protected]>
- Loading branch information
1 parent
7b96da0
commit ee43d91
Showing
34 changed files
with
285 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [released] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
name: Release build and publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3.1.0 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3.5.1 | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
java-version: '21' | ||
- name: Release build | ||
run: ./gradlew assembleRelease --scan | ||
run: ./gradlew :loading-button-android:assembleRelease | ||
- name: Publish to MavenCentral | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 --scan | ||
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache | ||
env: | ||
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | ||
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEW_SONATYPE_NEXUS_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEW_SONATYPE_NEXUS_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.NEW_SIGNING_KEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.NEW_SIGNING_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.NEW_SIGNING_KEY }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
plugins { | ||
alias(libs.plugins.application) apply false | ||
alias(libs.plugins.androidLibrary) apply false | ||
alias(libs.plugins.kotlinAndroid) apply false | ||
alias(libs.plugins.sonatype.publish) apply false | ||
alias(libs.plugins.kotlin.compose) apply false | ||
} | ||
|
||
extra["libraryVersion"] = "0.7.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
# Project-wide Gradle settings. | ||
|
||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
|
||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
# Default value: -Xmx10248m -XX:MaxPermSize=256m | ||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | ||
org.gradle.jvmargs=-Xmx1024M -Dkotlin.daemon.jvm.options\="-Xmx1024M" -XX\:+UseParallelGC -XX\:MaxMetaspaceSize\=512m -XX\:+HeapDumpOnOutOfMemoryError -Dfile.encoding\=UTF-8 | ||
android.enableJetifier=true | ||
android.useAndroidX=true | ||
android.defaults.buildfeatures.buildconfig=true | ||
android.nonTransitiveRClass=false | ||
android.nonFinalResIds=false | ||
kotlin.code.style=official | ||
kotlin.incremental=true | ||
org.gradle.caching=true | ||
|
||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app's APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
# Kotlin code style for this project: "official" or "obsolete": | ||
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 | ||
android.defaults.buildfeatures.buildconfig=true | ||
android.nonFinalResIds=false | ||
org.jetbrains.compose.experimental.uikit.enabled=true | ||
org.jetbrains.compose.experimental.jscanvas.enabled=true | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[versions] | ||
activityCompose = "1.10.0" | ||
agp = "8.8.0" | ||
appcompat = "1.7.0" | ||
composeBom = "2025.02.00" | ||
constraintlayout = "2.2.0" | ||
core = "1.6.1" | ||
coreKtx = "1.15.0" | ||
espressoCore = "3.6.1" | ||
junit = "4.13.2" | ||
junitVersion = "1.2.1" | ||
kotlin = "2.1.10" | ||
lifecycleRuntimeKtx = "2.8.7" | ||
material = "1.12.0" | ||
mockitoCore = "5.15.2" | ||
mockitoKotlin = "2.2.0" | ||
publish = "0.30.0" | ||
robolectric = "4.14.1" | ||
|
||
[libraries] | ||
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" } | ||
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } | ||
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" } | ||
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } | ||
androidx-core = { module = "androidx.test:core", version.ref = "core" } | ||
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } | ||
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" } | ||
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" } | ||
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } | ||
androidx-material3 = { module = "androidx.compose.material3:material3" } | ||
androidx-ui = { module = "androidx.compose.ui:ui" } | ||
androidx-ui-graphics = { module = "androidx.compose.ui:ui-graphics" } | ||
androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } | ||
androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } | ||
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } | ||
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } | ||
junit = { module = "junit:junit", version.ref = "junit" } | ||
material = { module = "com.google.android.material:material", version.ref = "material" } | ||
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" } | ||
mockito-kotlin = { module = "com.nhaarman.mockitokotlin2:mockito-kotlin", version.ref = "mockitoKotlin" } | ||
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } | ||
|
||
[plugins] | ||
application = { id = "com.android.application", version.ref = "agp" } | ||
androidLibrary = { id = "com.android.library", version.ref = "agp" } | ||
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
sonatype-publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" } | ||
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Wed Mar 06 10:41:53 EST 2024 | ||
#Fri Apr 14 15:25:27 CEST 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,58 @@ | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
val libraryVersion: String by rootProject.extra | ||
|
||
plugins { | ||
id("com.android.library") | ||
kotlin("android") | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.kotlinAndroid) | ||
alias(libs.plugins.sonatype.publish) | ||
} | ||
|
||
|
||
mavenPublishing { | ||
val artifactId = "loading-button" | ||
|
||
coordinates( | ||
groupId = "io.writeopia", | ||
artifactId = artifactId, | ||
version = libraryVersion | ||
) | ||
|
||
pom { | ||
name = artifactId | ||
description = "Core module of Writeopia" | ||
url = "https://github.com/leandroBorgesFerreira/LoadingButtonAndroid" | ||
|
||
developers { | ||
developer { | ||
id = "leandroBorgesFerreira" | ||
name = "Leandro Borges Ferreira" | ||
url = "https://github.com/leandroBorgesFerreira" | ||
} | ||
} | ||
|
||
licenses { | ||
license { | ||
name = "The Apache Software License, Version 2.0" | ||
url = "http://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
|
||
scm { | ||
connection = "scm:[email protected]:leandroBorgesFerreira/LoadingButtonAndroid.git" | ||
developerConnection = "scm:git:ssh://github.com/leandroBorgesFerreira/LoadingButtonAndroid.git" | ||
url = "https://github.com/leandroBorgesFerreira/LoadingButtonAndroid" | ||
} | ||
} | ||
|
||
signAllPublications() | ||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = false) | ||
} | ||
|
||
apply(from = "${rootDir}/scripts/publish-module.gradle") | ||
|
||
android { | ||
namespace = "com.github.leandroborgesferreira.loadingbutton" | ||
compileSdk = 34 | ||
namespace = "io.writeopia.loadingbutton" | ||
compileSdk = 35 | ||
|
||
defaultConfig { | ||
minSdk = 21 | ||
|
@@ -35,12 +80,12 @@ android { | |
} | ||
|
||
dependencies { | ||
implementation("androidx.core:core-ktx:1.12.0") | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
|
||
testImplementation("org.mockito:mockito-core:5.3.1") | ||
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0") | ||
testImplementation("org.robolectric:robolectric:4.10") | ||
testImplementation("androidx.test:core:1.5.0") | ||
testImplementation("junit:junit:4.13.2") | ||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.appcompat) | ||
|
||
testImplementation(libs.mockito.core) | ||
testImplementation(libs.mockito.kotlin) | ||
testImplementation(libs.robolectric) | ||
testImplementation(libs.androidx.core) | ||
testImplementation(libs.junit) | ||
} |
5 changes: 0 additions & 5 deletions
5
...ain/java/com/github/leandroborgesferreira/loadingbutton/animatedDrawables/ProgressType.kt
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...orgesferreira/loadingbutton/Extensions.kt → .../io/writeopia/loadingbutton/Extensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...button-android/src/main/java/io/writeopia/loadingbutton/animatedDrawables/ProgressType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.writeopia.loadingbutton.animatedDrawables | ||
|
||
enum class ProgressType { | ||
DETERMINATE, INDETERMINATE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.