Prima implementazione dello script per le multibuild

This commit is contained in:
Giuseppe Scorrano 2019-02-11 12:09:47 +01:00
parent 996f5978e9
commit b98530358d
12 changed files with 267 additions and 138 deletions

Binary file not shown.

1
.idea/gradle.xml generated
View File

@ -10,6 +10,7 @@
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" /> <option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/barcode_base_library" /> <option value="$PROJECT_DIR$/barcode_base_library" />
<option value="$PROJECT_DIR$/dynamic__base" />
<option value="$PROJECT_DIR$/dynamic_vgalimenti" /> <option value="$PROJECT_DIR$/dynamic_vgalimenti" />
<option value="$PROJECT_DIR$/pointmobilescannerlibrary" /> <option value="$PROJECT_DIR$/pointmobilescannerlibrary" />
<option value="$PROJECT_DIR$/waterfall_toolbar" /> <option value="$PROJECT_DIR$/waterfall_toolbar" />

1
.idea/modules.xml generated
View File

@ -5,6 +5,7 @@
<module fileurl="file://$PROJECT_DIR$/WMS_Native.iml" filepath="$PROJECT_DIR$/WMS_Native.iml" /> <module fileurl="file://$PROJECT_DIR$/WMS_Native.iml" filepath="$PROJECT_DIR$/WMS_Native.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" filepath="$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" /> <module fileurl="file://$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" filepath="$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" />
<module fileurl="file://$PROJECT_DIR$/dynamic__base/dynamic__base.iml" filepath="$PROJECT_DIR$/dynamic__base/dynamic__base.iml" />
<module fileurl="file://$PROJECT_DIR$/dynamic_vgalimenti/dynamic_vgalimenti.iml" filepath="$PROJECT_DIR$/dynamic_vgalimenti/dynamic_vgalimenti.iml" /> <module fileurl="file://$PROJECT_DIR$/dynamic_vgalimenti/dynamic_vgalimenti.iml" filepath="$PROJECT_DIR$/dynamic_vgalimenti/dynamic_vgalimenti.iml" />
<module fileurl="file://$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" filepath="$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" /> <module fileurl="file://$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" filepath="$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" />
<module fileurl="file://$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" filepath="$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" /> <module fileurl="file://$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" filepath="$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" />

View File

@ -1,151 +1,175 @@
buildscript { buildscript {
repositories { repositories {
maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.fabric.io/public' }
} }
dependencies { dependencies {
classpath 'io.fabric.tools:gradle:1.27.0' classpath 'io.fabric.tools:gradle:1.27.0'
} }
} }
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf' apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'io.fabric' apply plugin: 'io.fabric'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
android { android {
def appVersionCode = 35 def appVersionCode = 35
def appVersionName = '1.0.32' def appVersionName = '1.0.32'
signingConfigs { signingConfigs {
release { release {
keyAlias 'wms key' keyAlias 'wms key'
keyPassword 'inpmiy' keyPassword 'inpmiy'
storeFile file('Integry.jks') storeFile file('Integry.jks')
storePassword 'inpmiy' storePassword 'inpmiy'
} }
} }
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.all { output -> variant.outputs.all { output ->
output.outputFileName = "android-release_v2.apk" output.outputFileName = "android-release_v2.apk"
} }
} }
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion '28.0.3' buildToolsVersion '28.0.3'
defaultConfig {
applicationId "it.integry.integrywmsnative" defaultConfig {
minSdkVersion 21 applicationId "it.integry.integrywmsnative"
targetSdkVersion 28 minSdkVersion 21
versionCode appVersionCode targetSdkVersion 28
versionName appVersionName versionCode appVersionCode
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" versionName appVersionName
signingConfig signingConfigs.release testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} signingConfig signingConfigs.release
buildTypes { }
release {
minifyEnabled false buildTypes {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' release {
signingConfig signingConfigs.release minifyEnabled false
} proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} signingConfig signingConfigs.release
dataBinding { }
enabled = true }
} dataBinding {
compileOptions { enabled = true
targetCompatibility 1.8 }
sourceCompatibility 1.8 compileOptions {
} targetCompatibility 1.8
productFlavors { sourceCompatibility 1.8
} }
productFlavors {
}
build {
doLast {
delete "$projectDir/build/outputs/apk/release/version_v2.txt"
file("$projectDir/build/outputs/apk/release/version_v2.txt").text = appVersionCode + '\n' + appVersionName
}
}
gradle.projectsEvaluated { tasks.register("hello") { a ->
tasks.withType(JavaCompile.class) { doLast {
options.compilerArgs << "-Xmaxerrs" << "10000" println "${a}"
}
}
lintOptions { def packages = ['vgalimenti', 'biolevante', 'ime']
abortOnError false
}
dynamicFeatures = [":dynamic_vgalimenti"] dynamicFeatures.each { item -> dynamicFeatures.remove(item) }
packages.each { config ->
println ":dynamic_${config}"
dynamicFeatures.add(":dynamic_${config}")
project(':app').tasks.build.execute()
dynamicFeatures.remove(":dynamic_${config}")
}
}
}
} build {
doLast {
delete "$projectDir/build/outputs/apk/release/version_v2.txt"
file("$projectDir/build/outputs/apk/release/version_v2.txt").text = appVersionCode + '\n' + appVersionName
}
}
dependencies { gradle.projectsEvaluated {
implementation fileTree(include: ['*.jar'], dir: 'libs') tasks.withType(JavaCompile.class) {
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', { options.compilerArgs << "-Xmaxerrs" << "10000"
exclude group: 'com.android.support', module: 'support-annotations' }
}) }
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.orhanobut:logger:2.2.0' lintOptions {
implementation 'com.google.firebase:firebase-core:16.0.7' abortOnError false
implementation 'com.google.firebase:firebase-crash:16.2.1' }
implementation 'com.google.firebase:firebase-perf:16.2.3'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8' dynamicFeatures = [":dynamic__base"]
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha03' }
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'androidx.cardview:cardview:1.0.0' dependencies {
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02' implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.preference:preference:1.1.0-alpha02' androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
implementation 'com.squareup.okhttp3:okhttp:3.12.1' exclude group: 'com.android.support', module: 'support-annotations'
implementation 'com.squareup.retrofit2:retrofit:2.3.0' })
implementation 'com.squareup.retrofit2:converter-gson:2.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.annimon:stream:1.2.1' implementation 'com.orhanobut:logger:2.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0' implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0' implementation 'com.google.firebase:firebase-perf:16.2.3'
kapt "androidx.lifecycle:lifecycle-compiler:2.0.0" implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
implementation 'com.danielpuiu:ghostfish:2.0.0' implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
annotationProcessor "com.danielpuiu:ghostfish-compiler:2.0.0" implementation 'androidx.legacy:legacy-support-v4:1.0.0'
//MVVM implementation 'com.google.android.material:material:1.1.0-alpha03'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0" implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1' implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.1.1' implementation 'androidx.preference:preference:1.1.0-alpha02'
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1' implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.1.1' implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.1.1' implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
implementation 'com.jakewharton:butterknife:10.0.0' implementation 'com.annimon:stream:1.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0' implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0'
implementation 'br.com.zbra:android-linq:1.1.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
//FAB implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
implementation 'com.github.clans:fab:1.6.4' kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
//CUSTOM VIEWS implementation 'com.danielpuiu:ghostfish:2.0.0'
implementation 'com.github.NaimishTrivedi:FBToast:1.0' annotationProcessor "com.danielpuiu:ghostfish-compiler:2.0.0"
implementation 'de.hdodenhof:circleimageview:2.2.0' //MVVM
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar' annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0"
implementation 'com.github.andrefrsousa:SuperBottomSheet:1.2.1@aar' implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
implementation 'com.fede987:status-bar-alert:1.0.1' implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.1.1'
implementation 'com.fxn769:stash:1.2' implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1'
testImplementation 'junit:junit:4.12' implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.1.1'
implementation project(':waterfall_toolbar') implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.1.1'
implementation 'com.mikhaellopez:lazydatepicker:1.0.0' implementation 'com.jakewharton:butterknife:10.0.0'
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2' annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
//AppUpdate implementation 'br.com.zbra:android-linq:1.1.0'
implementation 'com.github.javiersantos:AppUpdater:2.7' //FAB
//Barcode implementation 'com.github.clans:fab:1.6.4'
implementation project(':pointmobilescannerlibrary') //CUSTOM VIEWS
implementation project(path: ':barcode_base_library') implementation 'com.github.NaimishTrivedi:FBToast:1.0'
} implementation 'de.hdodenhof:circleimageview:2.2.0'
repositories { implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
mavenCentral() implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar'
maven { url 'https://maven.fabric.io/public' } implementation 'com.github.andrefrsousa:SuperBottomSheet:1.2.1@aar'
} implementation 'com.fede987:status-bar-alert:1.0.1'
implementation 'com.fxn769:stash:1.2'
testImplementation 'junit:junit:4.12'
implementation project(':waterfall_toolbar')
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
//AppUpdate
implementation 'com.github.javiersantos:AppUpdater:2.7'
//Barcode
implementation project(':pointmobilescannerlibrary')
implementation project(path: ':barcode_base_library')
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}

42
app/build_VGAlimenti.bat Normal file
View File

@ -0,0 +1,42 @@
@echo off
SET nome_azienda=vgalimenti
setlocal enabledelayedexpansion
set INTEXTFILE=build.gradle
set OUTTEXTFILE=build_out.gradle
set SEARCHTEXT=:dynamic__base
set REPLACETEXT=:dynamic_%nome_azienda%
set OUTPUTLINE=
for /f "tokens=1,* delims=¶" %%A in ( '"findstr /n ^^ %INTEXTFILE%"') do (
SET string=%%A
for /f "delims=: tokens=1,*" %%a in ("!string!") do set "string=%%b"
if "!string!" == "" (
echo.>>%OUTTEXTFILE%
) else (
SET modified=!string:%SEARCHTEXT%=%REPLACETEXT%!
echo !modified! >> %OUTTEXTFILE%
)
)
del %INTEXTFILE%
rename %OUTTEXTFILE% %INTEXTFILE%
pause
gradle build
for /f "tokens=1,* delims=¶" %%A in ( '"findstr /n ^^ %INTEXTFILE%"') do (
SET string=%%A
for /f "delims=: tokens=1,*" %%a in ("!string!") do set "string=%%b"
if "!string!" == "" (
echo.>>%OUTTEXTFILE%
) else (
SET modified=!string:%REPLACETEXT%=%SEARCHTEXT%!
echo !modified! >> %OUTTEXTFILE%
)
)
del %INTEXTFILE%
rename %OUTTEXTFILE% %INTEXTFILE%

View File

@ -87,7 +87,6 @@ public class DialogVenditaFiltroAvanzato {
Button button = ((AlertDialog) dialogInterface).getButton(AlertDialog.BUTTON_NEUTRAL); Button button = ((AlertDialog) dialogInterface).getButton(AlertDialog.BUTTON_NEUTRAL);
button.setOnClickListener(view -> { button.setOnClickListener(view -> {
// TODO Do something
resetAll(viewModel); resetAll(viewModel);
}); });
}); });

View File

@ -183,5 +183,6 @@
<string name="recovering_data">Recovering data</string> <string name="recovering_data">Recovering data</string>
<string name="wait_a_moment">Wait a moment</string> <string name="wait_a_moment">Wait a moment</string>
<string name="title_dynamic_vgalimenti">Personalizzazione VGAlimenti</string> <string name="title_dynamic_vgalimenti">Personalizzazione VGAlimenti</string>
<string name="title_dynamic__base">Azienda Base</string>
</resources> </resources>

1
dynamic__base/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

View File

@ -0,0 +1,23 @@
apply plugin: 'com.android.dynamic-feature'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':app')
}

View File

@ -0,0 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
package="it.integry.wms.dynamic__base">
<dist:module
dist:instant="false"
dist:onDemand="true"
dist:title="@string/title_dynamic__base">
<dist:fusing dist:include="true" />
</dist:module>
</manifest>

View File

@ -0,0 +1,25 @@
package it.integry.wms.dynamic_customization;
import android.util.Log;
import it.integry.integrywmsnative.core.class_router.BaseRouter;
import it.integry.integrywmsnative.core.class_router.MethodDTO;
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathAlreadyDeclaredException;
public class DynamicContext {
public static void init() {
Log.d("DynamicContext", "Caricamento personalizzazioni per Azienda BASE");
// try {
//BaseRouter.registerPath("testToast", MethodDTO.fromName(OrdineVendita.class, "testMe"));
// } catch (MethodPathAlreadyDeclaredException ex) {
//
// }
Log.d("DynamicContext", "Caricamento personalizzazioni per Azienda BASE COMPLETATO");
}
}

View File

@ -1 +1 @@
include ':app', ':pointmobilescannerlibrary', ':waterfall_toolbar', ':barcode_base_library', ':dynamic_vgalimenti' include ':app', ':pointmobilescannerlibrary', ':waterfall_toolbar', ':barcode_base_library', ':dynamic_vgalimenti', ':dynamic__base'