-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from skydoves/migrate/version-catelog
Migrate maven publication plugin & gradle ktx scripts
- Loading branch information
Showing
54 changed files
with
587 additions
and
454 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
java-version: 17 | ||
- name: spotless | ||
run: ./gradlew spotlessCheck | ||
|
||
|
@@ -31,7 +31,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
java-version: 17 | ||
- name: API check | ||
run: ./gradlew apiCheck | ||
|
||
|
@@ -44,7 +44,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
java-version: 17 | ||
|
||
- name: Cache Gradle and wrapper | ||
uses: actions/cache@v3 | ||
|
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 |
---|---|---|
|
@@ -13,22 +13,26 @@ jobs: | |
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
- name: Set up JDK 11 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Grant Permission to Execute Gradle | ||
run: chmod +x gradlew | ||
|
||
- name: Release build | ||
run: ./gradlew assemble --scan | ||
- name: Source jar and dokka | ||
run: ./gradlew androidSourcesJar javadocJar --scan | ||
run: ./gradlew assemble --scan -x :benchmark:pixel6api31Setup -x :benchmark:pixel6api31NonMinifiedReleaseAndroidTest -x :benchmark:collectNonMinifiedReleaseBaselineProfile | ||
|
||
- name: Publish to MavenCentral | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository --scan | ||
run: | | ||
./gradlew publishAllPublicationsToMavenCentral --no-daemon --no-parallel | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_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.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} | ||
SNAPSHOT: true |
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 |
---|---|---|
|
@@ -2,30 +2,35 @@ name: Publish | |
|
||
on: | ||
release: | ||
types: [released] | ||
types: [ released ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
name: Release build and publish | ||
name: Snapshot build and publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
- name: Set up JDK 11 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Grant Permission to Execute Gradle | ||
run: chmod +x gradlew | ||
|
||
- name: Release build | ||
run: ./gradlew assemble --scan | ||
- name: Source jar and dokka | ||
run: ./gradlew androidSourcesJar javadocJar --scan | ||
run: ./gradlew assemble --scan -x :benchmark:pixel6api31Setup -x :benchmark:pixel6api31NonMinifiedReleaseAndroidTest -x :benchmark:collectNonMinifiedReleaseBaselineProfile | ||
|
||
- name: Publish to MavenCentral | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository --scan | ||
run: | | ||
./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_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.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.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,55 @@ | ||
import com.github.skydoves.colorpicker.compose.Configuration | ||
|
||
@Suppress("DSL_SCOPE_VIOLATION") | ||
plugins { | ||
id(libs.plugins.android.application.get().pluginId) | ||
id(libs.plugins.kotlin.android.get().pluginId) | ||
id(libs.plugins.baseline.profile.get().pluginId) | ||
} | ||
android { | ||
namespace = "com.github.skydoves.colorpickercomposedemo" | ||
compileSdk = Configuration.compileSdk | ||
defaultConfig { | ||
applicationId = "com.github.skydoves.colorpickercomposedemo" | ||
minSdk = Configuration.minSdk | ||
targetSdk = Configuration.targetSdk | ||
versionCode = Configuration.versionCode | ||
versionName = Configuration.versionName | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = libs.versions.jvmTarget.get() | ||
} | ||
|
||
buildFeatures { | ||
compose = true | ||
buildConfig = true | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get() | ||
} | ||
|
||
lint { | ||
abortOnError = false | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":colorpicker-compose")) | ||
|
||
implementation(platform(libs.androidx.compose.bom)) | ||
implementation(libs.androidx.activity.compose) | ||
implementation(libs.androidx.compose.ui) | ||
implementation(libs.androidx.compose.ui.tooling) | ||
implementation(libs.androidx.compose.material) | ||
implementation(libs.androidx.compose.foundation) | ||
implementation(libs.androidx.compose.runtime) | ||
|
||
implementation(libs.photo.picker) | ||
} |
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
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
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,6 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Designed and developed by 2022 skydoves (Jaewoong Eum) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp"> | ||
|
||
<path android:fillColor="@android:color/white" android:pathData="M15.96,10.29l-2.75,3.54 -1.96,-2.36L8.5,15h11l-3.54,-4.71zM3,5L1,5v16c0,1.1 0.9,2 2,2h16v-2L3,21L3,5zM21,1L7,1c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L23,3c0,-1.1 -0.9,-2 -2,-2zM21,17L7,17L7,3h14v14z"/> | ||
|
||
</vector> |
Oops, something went wrong.