mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 21:25:38 +00:00
add files from Eureka template mobile-pipeline-android@v1.5.3
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
|
||||
package_name('com.sap.sailing')
|
||||
|
||||
|
||||
# For more information about the Appfile, see:
|
||||
# https://docs.fastlane.tools/advanced/#appfile
|
||||
@@ -0,0 +1,79 @@
|
||||
# This file contains the fastlane.tools configuration
|
||||
# You can find the documentation at https://docs.fastlane.tools
|
||||
#
|
||||
# For a list of all available actions, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/actions
|
||||
#
|
||||
# For a list of all available plugins, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/plugins/available-plugins
|
||||
#
|
||||
|
||||
default_platform(:android)
|
||||
|
||||
platform :android do
|
||||
|
||||
def update_version_code(code: 1)
|
||||
set_properties_value(
|
||||
path: "gradle.properties",
|
||||
key: "versionCode",
|
||||
value: "#{code}"
|
||||
)
|
||||
end
|
||||
|
||||
desc "Compile debug and test sources and lint them"
|
||||
lane :build do
|
||||
gradle(task: "compileDebugSources")
|
||||
gradle(task: "compileDebugUnitTestSources")
|
||||
gradle(task: "compileDebugAndroidTestSources")
|
||||
end
|
||||
|
||||
desc "Runs all the tests & creates Jacoco Coverage reports"
|
||||
lane :test do
|
||||
gradle(task: "jacocoTestCoverageVerification")
|
||||
end
|
||||
|
||||
desc "Assemble app"
|
||||
lane :releaseBuild do
|
||||
# Automatic versioning
|
||||
if is_ci
|
||||
commits = sh("git rev-list --count HEAD").to_i
|
||||
update_version_code(code: commits)
|
||||
|
||||
# Generate GroupId, ArtifactId, Version coordinates for central signing service
|
||||
generate_gav
|
||||
end
|
||||
|
||||
gradle(task: "assembleRelease") # Build .apk
|
||||
gradle(task: "bundleRelease") # Build .aab
|
||||
end
|
||||
|
||||
desc "Call Kotlin Lint"
|
||||
lane :lint do
|
||||
gradle(task: "ktlintCheck")
|
||||
end
|
||||
|
||||
desc "Print GAV for central signing service to gav.json"
|
||||
private_lane :generate_gav do
|
||||
versionName = get_properties_value(
|
||||
key: "versionName",
|
||||
path: "gradle.properties"
|
||||
)
|
||||
versionCode = get_properties_value(
|
||||
key: "versionCode",
|
||||
path: "gradle.properties"
|
||||
)
|
||||
|
||||
gav = {
|
||||
groupID: CredentialsManager::AppfileConfig.try_fetch_value(:package_name),
|
||||
artifactID: 'sapsailing',
|
||||
version: "#{versionName}.#{versionCode}"
|
||||
}
|
||||
|
||||
write_json(
|
||||
file_path: "gav.json",
|
||||
hash: gav
|
||||
)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
# Autogenerated by fastlane
|
||||
#
|
||||
# Ensure this file is checked in to source control!
|
||||
|
||||
gem 'fastlane-plugin-properties'
|
||||
gem 'fastlane-plugin-json'
|
||||
Reference in New Issue
Block a user