Skip to content

feat: kotlin 1.9.22 (#56) #403

feat: kotlin 1.9.22 (#56)

feat: kotlin 1.9.22 (#56) #403

Workflow file for this run

name: Complete Build
on:
push:
pull_request:
workflow_dispatch:
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
build-smartype:
name: "Build Smartype"
runs-on: macOS-14
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
with:
ruby-version: '3.1.0'
- uses: actions/checkout@v2
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.17
- name: Install Cocoapods
run: sudo gem install cocoapods; sudo gem install cocoapods-generate
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: Publish all
run: ./gradlew publishToMavenLocal
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive maven
uses: actions/upload-artifact@v2
with:
name: generator-maven
path: |
~/.m2/repository/com/mparticle
- name: Archive generator jar
uses: actions/upload-artifact@v2
with:
name: generator-jar
path: |
smartype-generator/build/libs
build-web-example:
name: "Build Web Example"
needs: build-smartype
defaults:
run:
working-directory: examples/webExample
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.17
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: pre-create maven dir
run: |
mkdir -p ~/.m2/repository/com/mparticle
- name: Download maven repo
uses: actions/download-artifact@v2
with:
name: generator-maven
path: ~/.m2/repository/com/mparticle
- name: Download generator
uses: actions/download-artifact@v2
with:
name: generator-jar
path: examples/webExample
- name: rename generator jar
run: |
rm -f smartype-generator-*-*.jar
mv smartype-generator-*.jar smartype.jar
- name: Run smartype
run: |
java -jar smartype.jar generate
- name: Install dependencies
run: npm install
- name: Build web app
run: npm run build
- name: Run Tests
working-directory: test-json
run: bash run-all-tests.sh --platform=web --jar=../examples/webExample/smartype.jar
build-android-example:
name: "Build Android Example"
needs: build-smartype
defaults:
run:
working-directory: examples/androidExample
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.17
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: pre-create maven dir
run: |
mkdir -p ~/.m2/repository/com/mparticle
- name: Download maven repo
uses: actions/download-artifact@v2
with:
name: generator-maven
path: ~/.m2/repository/com/mparticle
- name: Download generator
uses: actions/download-artifact@v2
with:
name: generator-jar
path: examples/androidExample
- name: rename generator jar
run: |
rm -f smartype-generator-*-*.jar
mv smartype-generator-*.jar smartype.jar
- name: Run smartype
run: |
java -jar smartype.jar generate
- name: Assemble Android App
run: ./gradlew assembleRelease
- name: Run Tests
working-directory: test-json
run: bash run-all-tests.sh --platform=android --jar=../examples/androidExample/smartype.jar
build-ios-example:
name: "Build iOS Example"
needs: build-smartype
defaults:
run:
working-directory: examples/iosExample
runs-on: macOS-14
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
with:
ruby-version: '3.1.0'
- uses: actions/checkout@v2
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.17
- name: Install Cocoapods
run: sudo gem install cocoapods; sudo gem install cocoapods-generate
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: pre-create maven dir
run: |
mkdir -p ~/.m2/repository/com/mparticle
- name: Download maven repo
uses: actions/download-artifact@v2
with:
name: generator-maven
path: ~/.m2/repository/com/mparticle
- name: Download generator
uses: actions/download-artifact@v2
with:
name: generator-jar
path: examples/iosExample
- name: rename generator jar
run: |
rm -f smartype-generator-*-*.jar
mv smartype-generator-*.jar smartype.jar
- name: Run smartype
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
java -jar smartype.jar generate --config=SmartypeExample/smartype.config.json
- name: Run Tests
working-directory: test-json
run: bash run-all-tests.sh --platform=ios --jar=../examples/iosExample/smartype.jar
- name: Build iOS app
run: pod update; xcodebuild -workspace SmartypeExample.xcworkspace -scheme SmartypeExample -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest'
generate-all:
name: "Generate, All Platforms "
needs: build-smartype
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
with:
ruby-version: '3.1.0'
- uses: actions/checkout@v2
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.17
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install Cocoapods
run: sudo gem install cocoapods; sudo gem install cocoapods-generate
- name: pre-create maven dir
run: |
mkdir -p ~/.m2/repository/com/mparticle
- name: Download maven repo
uses: actions/download-artifact@v2
with:
name: generator-maven
path: ~/.m2/repository/com/mparticle
- name: Download generator
uses: actions/download-artifact@v2
with:
name: generator-jar
- name: rename generator jar
run: |
rm -f smartype-generator-*-*.jar
mv smartype-generator-*.jar smartype.jar
- name: Run smartype
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
java -jar smartype.jar generate
publish:
name: "Publish"
runs-on: macOS-14
if: github.ref == 'refs/heads/main'
needs: [build-web-example, build-ios-example, build-android-example, generate-all]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
with:
ruby-version: '3.1.0'
- name: Checkout
uses: actions/checkout@v2
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.17
- name: Install Cocoapods
run: sudo gem install cocoapods; sudo gem install cocoapods-generate
- name: Upload Artifacts
run: ./gradlew publishAllPublicationsToStagingRepository
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_CENTRAL_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_CENTRAL_SIGNING_KEY_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
automerge:
name: "Automerge Dependabot PRs"
runs-on: ubuntu-18.04
needs: [build-ios-example, build-android-example, build-web-example, generate-all]
if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
steps:
- name: Rebase Dependabot PR
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.pulls.merge({
owner: context.repo.owner,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number,
merge_method: 'rebase'
});