Skip to content

Commit 63f647f

Browse files
committed
feat: compose multiplatform
1 parent cf93244 commit 63f647f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+980
-549
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gradle
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Build
2+
description: Build
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: ./.github/workflows/actions/prepare
8+
9+
- name: Build library
10+
shell: bash
11+
run: ./gradlew assembleRelease
12+
13+
- name: Build sample apps
14+
shell: bash
15+
run: ./gradlew -p example assembleRelease
16+
17+
- name: Build dokka
18+
shell: bash
19+
run: ./gradlew dokkaGeneratePublicationHtml
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build
2+
description: Build
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: ./.github/workflows/actions/prepare
8+
9+
- name: Build dokka
10+
shell: bash
11+
run: ./gradlew dokkaGeneratePublicationHtml
12+
13+
- uses: actions/upload-artifact@v4
14+
with:
15+
name: compose-cache-dokka
16+
path: build/dokka/htmlCollector/
17+
retention-days: 1
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Prepare
2+
description: Prepare
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: gradle/wrapper-validation-action@v2
8+
9+
- uses: actions/cache@v3
10+
with:
11+
path: |
12+
~/.gradle/caches/modules-*
13+
~/.gradle/caches/jars-*
14+
~/.gradle/caches/build-cache-*
15+
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle.kts') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
16+
17+
- name: set up JDK
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: gradle
23+
24+
- name: Grant execute permission for gradlew
25+
shell: bash
26+
run: chmod +x gradlew
27+
28+
- name: Select Xcode Version
29+
uses: mobiledevops/xcode-select-version-action@v1
30+
with:
31+
xcode-select-version: 15.0.1
32+
33+
- name: show Xcode version
34+
shell: bash
35+
run: xcodebuild -version
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test
2+
description: Test
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: ./.github/workflows/actions/prepare
8+
9+
- name: Test library
10+
shell: bash
11+
run: ./gradlew check
12+
13+
- name: Report JVM Tests
14+
uses: dorny/test-reporter@v1.7.0
15+
if: success() || failure() # run this step even if previous step failed
16+
with:
17+
name: JVM Tests
18+
path: '*/build/test-results/*jvm*/TEST-*.xml' # Path to test results
19+
reporter: java-junit # Format of test results
20+
21+
- name: Report iOS Tests
22+
uses: dorny/test-reporter@v1.7.0
23+
if: success() || failure() # run this step even if previous step failed
24+
with:
25+
name: iOS Tests # Name of the check run which will be created
26+
path: '*/build/test-results/*ios*/TEST-*.xml' # Path to test results
27+
reporter: java-junit # Format of test results

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
branches: [ "main" ]
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
concurrency:
12+
group: ${{ github.name }}-${{ github.workflow }}-${{ github.head_ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
id-token: write
17+
contents: read
18+
checks: write # required for test-reporter
19+
20+
jobs:
21+
build:
22+
runs-on: macos-13
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: ./.github/workflows/actions/build
27+
28+
# test:
29+
# needs: [ build ]
30+
# runs-on: macos-13
31+
# steps:
32+
# - uses: actions/checkout@v4
33+
# - uses: ./.github/workflows/actions/test
34+
35+
deploy-snapshot:
36+
needs: [ build ]
37+
if: github.ref == 'refs/heads/main'
38+
runs-on: macos-13
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
ref: ${{ github.ref }}
44+
fetch-tags: true
45+
fetch-depth: 0
46+
47+
- uses: ./.github/workflows/actions/prepare
48+
49+
- name: Setup git-mkver
50+
uses: cperezabo/setup-git-mkver@v1.2.0
51+
with:
52+
version: "1.3.0"
53+
54+
- name: Generate version
55+
run: |
56+
echo "tags: $(git tag)"
57+
echo "log:"
58+
git log -n 3
59+
git status
60+
export VERSION=$(git mkver next --pre-release)
61+
echo "this is version: $VERSION"
62+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
63+
64+
- name: Publish
65+
run: ./gradlew publishAllPublicationsToSonatypeRepository -Pversion=$VERSION --max-workers 1
66+
env:
67+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
68+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
69+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
70+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
71+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
72+
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}

.github/workflows/buildRelease.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Release
2+
3+
on:
4+
release:
5+
types: [prereleased, released]
6+
7+
jobs:
8+
deploy-release:
9+
runs-on: macos-13
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: ./.github/workflows/actions/prepare
14+
15+
- name: Generate version
16+
run: |
17+
export VERSION=${{ github.event.release.tag_name }}
18+
echo VERSION
19+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
20+
21+
- name: Publish
22+
run: |
23+
./gradlew publishAllPublicationsToSonatypeRepository closeAndReleaseSonatypeStagingRepository -Pversion=$VERSION --max-workers 1
24+
env:
25+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
26+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
27+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
28+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
29+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
30+
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
31+
32+
#- uses: ./.github/workflows/actions/doc

.github/workflows/lint.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)