250 lines
8.2 KiB
Groovy
250 lines
8.2 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
if (!project.hasProperty("disable-performance-plugin")) {
|
|
apply plugin: 'com.google.firebase.firebase-perf'
|
|
}
|
|
|
|
apply plugin: 'com.google.firebase.crashlytics'
|
|
//apply plugin: 'kotlin-android'
|
|
apply plugin: 'com.google.gms.google-services'
|
|
|
|
|
|
android {
|
|
|
|
def appVersionCode = 553
|
|
def appVersionName = '1.50.04'
|
|
|
|
signingConfigs {
|
|
release {
|
|
keyAlias 'wms key'
|
|
keyPassword 'inpmiy'
|
|
storeFile file('Integry.jks')
|
|
storePassword 'inpmiy'
|
|
|
|
enableV3Signing true
|
|
enableV4Signing true
|
|
}
|
|
}
|
|
|
|
applicationVariants.configureEach { variant ->
|
|
variant.outputs.configureEach { output ->
|
|
output.outputFileName = "android-release.apk"
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "it.integry.integrywmsnative"
|
|
minSdkVersion 21
|
|
targetSdk 36
|
|
versionCode appVersionCode
|
|
versionName appVersionName
|
|
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
signingConfig signingConfigs.release
|
|
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments += ["room.schemaLocation":
|
|
"$projectDir/schemas".toString()]
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
ext.enableCrashlytics = false
|
|
// minifyEnabled true // Abilita la minimizzazione del codice
|
|
// shrinkResources true // Rimuove risorse non utilizzate
|
|
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
release {
|
|
// minifyEnabled true // Abilita la minimizzazione del codice
|
|
// shrinkResources true // Rimuove risorse non utilizzate
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.release
|
|
firebaseCrashlytics {
|
|
mappingFileUploadEnabled true
|
|
}
|
|
}
|
|
}
|
|
|
|
android.buildFeatures.dataBinding true
|
|
android.buildFeatures.buildConfig true
|
|
|
|
android.dataBinding.enabledForTests true
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
coreLibraryDesugaringEnabled true
|
|
}
|
|
|
|
productFlavors {
|
|
}
|
|
|
|
|
|
|
|
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile.class).tap {
|
|
configureEach {
|
|
options.compilerArgs << "-Xmaxerrs" << "10000"
|
|
}
|
|
}
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
namespace 'it.integry.integrywmsnative'
|
|
compileSdk 36
|
|
}
|
|
|
|
configurations {
|
|
all*.exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
|
|
all*.exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
|
|
}
|
|
|
|
dependencies {
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
// androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
|
|
// exclude group: 'com.android.support', module: 'support-annotations'
|
|
// })
|
|
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
implementation 'com.github.lupaulus:logger:2.3.2'
|
|
|
|
// Import the Firebase BoM
|
|
implementation platform('com.google.firebase:firebase-bom:33.16.0')
|
|
implementation 'com.google.firebase:firebase-analytics'
|
|
implementation 'com.google.firebase:firebase-crashlytics'
|
|
implementation 'com.google.firebase:firebase-perf'
|
|
implementation 'com.google.android.gms:play-services-basement:18.7.1'
|
|
|
|
//JJWT
|
|
implementation 'io.jsonwebtoken:jjwt-api:0.13.0'
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0'
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.7.1'
|
|
implementation 'com.google.android.material:material:1.12.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
implementation 'androidx.recyclerview:recyclerview:1.4.0'
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
|
|
implementation('androidx.preference:preference-ktx:1.2.1') {
|
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
|
|
}
|
|
|
|
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
|
implementation 'com.squareup.retrofit2:retrofit:3.0.0'
|
|
implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
|
|
implementation 'com.annimon:stream:1.2.2'
|
|
implementation 'androidx.lifecycle:lifecycle-runtime:2.9.3'
|
|
implementation 'org.apache.commons:commons-text:1.14.0'
|
|
|
|
//MVVM
|
|
def dagger2_version = '2.57.1'
|
|
implementation "com.google.dagger:dagger:$dagger2_version"
|
|
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
|
implementation "com.google.dagger:dagger-android:$dagger2_version"
|
|
implementation "com.google.dagger:dagger-android-support:$dagger2_version"
|
|
// if you use the support libraries
|
|
annotationProcessor "com.google.dagger:dagger-android-processor:$dagger2_version"
|
|
|
|
//FAB
|
|
implementation 'com.github.clans:fab:1.6.4'
|
|
//CUSTOM VIEWS
|
|
implementation 'com.github.cachapa:ExpandableLayout:2.9.2'
|
|
implementation 'com.github.zhukic:sectioned-recyclerview:1.2.3'
|
|
implementation 'com.github.pedromassango:doubleClick:3.0'
|
|
|
|
//SQLite ROOM
|
|
def room_version = "2.7.2"
|
|
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
|
implementation "androidx.room:room-rxjava3:$room_version"
|
|
|
|
//Barcode
|
|
implementation project(':pointmobilescannerlibrary')
|
|
implementation project(':zebrascannerlibrary')
|
|
implementation project(':barcode_base_android_library')
|
|
implementation project(':honeywellscannerlibrary')
|
|
implementation project(':keyobardemulatorscannerlibrary')
|
|
|
|
|
|
implementation 'com.github.RaviKoradiya:LiveAdapter:1.3.4'
|
|
|
|
// Required -- JUnit 4 framework
|
|
// testImplementation "org.junit.jupiter:junit-jupiter-api:5.8.1"
|
|
// androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
|
// androidTestImplementation 'org.testng:testng:7.4.0'
|
|
|
|
|
|
//Bluetooth device manager
|
|
implementation 'com.github.harry1453:android-bluetooth-serial:v1.1.2'
|
|
|
|
// RxJava is also required.
|
|
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
|
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
|
|
|
//Barcode generator
|
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
|
|
|
implementation("org.javatuples:javatuples:1.2")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
maven { url 'https://jitpack.io' }
|
|
}
|
|
|
|
tasks.register('addBetaSuffix') {
|
|
doLast {
|
|
def gradleFile = file("build.gradle")
|
|
def content = gradleFile.text
|
|
|
|
// Modifica appVersionName
|
|
content = content.replaceAll(/appVersionName\s*=\s*'(.*?)'/) { fullMatch, version ->
|
|
"appVersionName = '${version}-beta'"
|
|
}
|
|
|
|
// Modifica outputFileName
|
|
content = content.replaceAll(/output\.outputFileName\s*=\s*"(.*?)"/) { fullMatch, filename ->
|
|
"output.outputFileName = \"${filename.replace('.apk', '-beta.apk')}\""
|
|
}
|
|
|
|
// Modifica direttamente la riga che crea 'version.txt' in 'version-beta.txt'
|
|
content = content.replace(
|
|
"def versionFile = new File(outputDir, \"version.txt\")",
|
|
"def versionFile = new File(outputDir, \"version-beta.txt\")"
|
|
)
|
|
|
|
// Sovrascrivi il file
|
|
gradleFile.write(content)
|
|
}
|
|
}
|
|
|
|
tasks.register('createVersionFile') {
|
|
doLast {
|
|
def outputDir = file("${projectDir}/build/outputs/apk/release")
|
|
def versionFile = new File(outputDir, "version.txt")
|
|
|
|
// Cancella il file se esiste
|
|
if (versionFile.exists()) {
|
|
versionFile.delete()
|
|
}
|
|
|
|
// Crea il file con i contenuti desiderati
|
|
versionFile.write("${android.defaultConfig.versionCode}\n${android.defaultConfig.versionName}\nforced=true")
|
|
}
|
|
}
|
|
|
|
|
|
afterEvaluate {
|
|
tasks.assembleRelease.finalizedBy createVersionFile
|
|
}
|