Код: Выделить всё
Run r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Corretto_jdk/17.0.11-9.1/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Corretto_jdk/17.0.11-9.1/x64
BUILD_TOOL_VERSION: 34.0.0
Preparing to sign key @ app/build/outputs/apk/release with signing key
Found 1 release files.
Error: Couldnt find the Android build tools @ /usr/local/lib/android/sdk/build-tools/29.0.3
Error: Unable to locate executable file: /usr/local/lib/android/sdk/build-tools/29.0.3/zipalign. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
Код: Выделить всё
name: Create release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build Project
run: ./gradlew build -x test
- name: Build Release APK
run: ./gradlew bundleRelease
- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGN_KEY_STORE_FILE_B64 }}
alias: ${{ secrets.SIGN_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGN_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.SIGN_KEY_PASSWORD }}
- name: Get version time
uses: 1466587594/get-current-time@v2
id: version-name
with:
format: "YYYY.MMDD.HHmm"
- name: Rename release APK
run: mv app/build/outputs/apk/release/app-release-unsigned-signed.apk app/build/outputs/apk/release/cepsa-standalone-app.apk
- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
if-no-files-found: error
path: |
app/build/outputs/apk/release/cepsa-standalone-app.apk
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
tag_name: "v_${{ steps.version-name.outputs.formattedTime }}"
name: "Cepsa App ${{ steps.version-name.outputs.formattedTime }}"
draft: true
prerelease: false
generate_release_notes: true
files: |
app/build/outputs/apk/release/cepsa-standalone-app.apk
Код: Выделить всё
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'org.jetbrains.kotlin.plugin.serialization'
}
android {
namespace 'es.paytef.cepsastandalone'
compileSdk 33
defaultConfig {
buildToolsVersion "33.0.0"
applicationId "es.paytef.cepsastandalone"
minSdk 24
targetSdk 33
versionCode 10
versionName "10.0"
buildConfigField("String", "BASE_URL", base_url)
buildConfigField("String", "DB_NAME", db_name)
buildConfigField("String", "DB_SESSION_NAME", db_session_name)
buildConfigField("String", "DB_SHIFT_NAME", db_shift_name)
buildConfigField("String", "DB_PRODUCTS_NAME", db_products_name)
buildConfigField("String", "DB_SELLS_NAME", db_sells_name)
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
sourceSets {
// Adds exported schema location as test app assets.
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
kotlin {
jvmToolchain(17)
}
buildFeatures {
buildConfig = true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.4'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation "androidx.core:core-ktx:$core_ktx_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.activity:activity-compose:1.7.2'
implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialization"
implementation project(path: ':commons')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
//ApiConnectionClient
implementation project(path: ':paytef_sdk')
//Navigation compose
implementation "androidx.navigation:navigation-compose:2.6.0"
// retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
implementation "com.squareup.retrofit2:converter-jaxb:$retrofit_version"
//Singleton and Inject annotation
implementation 'javax.inject:javax.inject:1'
implementation 'androidx.test.ext:junit-ktx:1.1.5'
implementation 'androidx.test:runner:1.5.2'
implementation "androidx.hilt:hilt-navigation-fragment:1.0.0"
implementation "androidx.hilt:hilt-navigation-compose:1.1.0-alpha01"
kapt "androidx.hilt:hilt-compiler:1.0.0"
//hilt libraries for custom Component.
implementation "com.google.dagger:hilt-android:2.44"
kapt "com.google.dagger:hilt-android-compiler:2.44"
//Room libraries
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
// To use Kotlin annotation processing tool (kapt)
implementation "androidx.room:room-ktx:$room_version"
}
Код: Выделить всё
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
// SDK versions
sdkMinVersion = 24
sdkCompileVersion = 33
sdkTargetVersion = 33
}
dependencies{
classpath 'com.android.tools.build:gradle:8.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.44"
classpath "org.jetbrains.kotlin:kotlin-serialization:1.8.10"
}
repositories {
google()
}
}
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'com.google.dagger.hilt.android' version '2.44' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Если у вас есть некоторый опыт в такая проблема, заранее спасибо!
Подробнее здесь: https://stackoverflow.com/questions/785 ... dk-build-t
Мобильная версия