Skip to content

Commit

Permalink
Add Localversion (eclipse-velocitas#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
wba2hi authored Nov 27, 2024
1 parent b49b23e commit 2146399
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/localversion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release local version
concurrency:
group: local-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
push:
# Run only on branches/commits and not tags
branches:
- main
pull_request:
branches:
- main

jobs:
create-local-version:
name: Create local version
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Initialize Caches
run: ./gradlew clean build

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vehicle-app-kotlin-template
include-hidden-files: true
path: |
./**
!build
!.idea
!.github
!.git
!.gitignore
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Gradle cache
cache

# Gradle files
.gradle/
build/
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tasks.withType<Detekt>().configureEach {
parallel = true
setSource(projectDir)
include("**/*.kt", "**/*.kts")
exclude("**/resources/**", "**/build/**", "**/node_modules/**")
exclude("**/resources/**", "**/build/**", "**/node_modules/**", "**/cache/**")

jvmTarget = "1.8"
}
Expand All @@ -73,7 +73,7 @@ tasks.withType<DetektCreateBaselineTask>().configureEach {

setSource(projectDir)
include("**/*.kt", "**/*.kts")
exclude("**/resources/**", "**/build/**")
exclude("**/resources/**", "**/build/**", "**/node_modules/**", "**/cache/**")
}

tasks.withType<Detekt>().configureEach {
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/ktlint.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ val ktlintCheck by tasks.registering(JavaExec::class) {
"**/src/**/*.kt",
"**.kts",
"!**/build/**",
"!**/cache/**",
)
}

Expand All @@ -52,6 +53,7 @@ tasks.register<JavaExec>("ktlintFormat") {
"**/src/**/*.kt",
"**.kts",
"!**/build/**",
"!**/cache/**",
)
}

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ kotlin.code.style=official
# 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
# move gradle cache into repository
systemProp.gradle.user.home=cache/gradle

0 comments on commit 2146399

Please sign in to comment.