generated from AdamMc331/AndroidAppTemplate
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
183 additions
and
88 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Android Build | ||
|
||
# This will cancel any in progress workflows for the same PR, if | ||
# multiple pushes happen in quick succession. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
android-build: | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set Up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
# Only write to the cache for builds on the 'development' branch | ||
cache-read-only: ${{ github.ref != 'refs/heads/development' }} | ||
|
||
- name: Generate local.properties | ||
env: | ||
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} | ||
run: echo $LOCAL_PROPERTIES > ./local.properties | ||
|
||
# assembleDebug is used to improve build times by only building | ||
# the debug Android artifacts. https://touchlab.co/touchlab-build-only-what-you-need | ||
- name: Build Project | ||
run: ./gradlew assembleDebug |
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
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,41 @@ | ||
name: iOS Build | ||
|
||
# This will cancel any in progress workflows for the same PR, if | ||
# multiple pushes happen in quick succession. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
ios-build: | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set Up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Generate local.properties | ||
env: | ||
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} | ||
run: echo $LOCAL_PROPERTIES > ./local.properties | ||
|
||
- name: Run tests | ||
run: ./gradlew :shared:iosX64Test | ||
|
||
- name: Build | ||
uses: sersoft-gmbh/xcodebuild-action@v3 | ||
with: | ||
project: iosApp/templateIOS.xcodeproj | ||
scheme: templateIOS | ||
destination: name=iPhone 8 | ||
sdk: iphoneos | ||
configuration: Debug | ||
action: build | ||
use-xcpretty: false | ||
build-settings: CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO |
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 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,43 @@ | ||
@file:Suppress("MagicNumber", "WildcardImport", "ForbiddenComment") | ||
|
||
// Editing this file: https://github.com/danger/kotlin?tab=readme-ov-file#autocomplete-and-syntax-highlighting-in-intellij-idea-or-android-studio | ||
import systems.danger.kotlin.* | ||
import java.io.File | ||
|
||
danger(args) { | ||
|
||
onGitHub { | ||
val additions = pullRequest.additions ?: 0 | ||
val deletions = pullRequest.deletions ?: 0 | ||
|
||
message("Thanks @${pullRequest.user.login}!") | ||
|
||
if (pullRequest.body.isNullOrBlank()) { | ||
fail("Please provide a summary in the Pull Request description.") | ||
} | ||
|
||
if (additions > 500) { | ||
warn("Please consider breaking up this pull request.") | ||
} | ||
|
||
if (issue.labels.isEmpty()) { | ||
warn("Please add labels to this PR.") | ||
} | ||
|
||
if (deletions > additions) { | ||
message("🎉 Code Cleanup!") | ||
} | ||
|
||
val updatesFile = File("build/dependencyUpdates/report.txt") | ||
val lines = updatesFile.readLines() | ||
|
||
val headerIndex = lines.indexOfFirst { line -> | ||
line.contains("The following dependencies have later milestone versions:") | ||
} | ||
|
||
if (headerIndex >= 0) { | ||
val message = lines.subList(headerIndex, lines.size).joinToString("\n") | ||
message(message) | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apply plugin: "com.github.ben-manes.versions" | ||
|
||
def isNonStable = { String version -> | ||
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) } | ||
def regex = /^[0-9,.v-]+(-r)?$/ | ||
return !stableKeyword && !(version ==~ regex) | ||
} | ||
|
||
tasks.named("dependencyUpdates").configure { | ||
rejectVersionIf { | ||
isNonStable(it.candidate.version) | ||
} | ||
|
||
gradleReleaseChannel = "current" | ||
} |
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