SHARE
TWEET

sagl

a guest Mar 25th, 2019 53 in 95 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. apply plugin: 'com.android.application'
  2.  
  3. android {
  4.     compileSdkVersion = 28
  5.     buildToolsVersion = '28.0.3'
  6.     defaultConfig {
  7.         testInstrumentationRunner = 'android.support.test.runner.AndroidJUnitRunner'
  8.         applicationId = 'com.loafwallet'
  9.         minSdkVersion 23
  10.         targetSdkVersion 28
  11.         versionCode 174
  12.         versionName "174"
  13.         multiDexEnabled true
  14.  
  15.         // Similar to other properties in the defaultConfig block,
  16.         // you can configure the ndk block for each product flavor
  17.         // in your build configuration.
  18.         ndk {
  19.             // Specifies the ABI configurations of your native
  20.             // libraries Gradle should build and package with your APK.
  21.             abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
  22.         }
  23.         externalNativeBuild {
  24.             cmake {
  25.                 arguments "-DANDROID_TOOLCHAIN=clang"
  26.             }
  27.         }
  28.  
  29.     }
  30.     testOptions {
  31.         unitTests.returnDefaultValues = true
  32.     }
  33.     packagingOptions {
  34.         pickFirst 'protobuf.meta'
  35.     }
  36.     externalNativeBuild {
  37.         cmake {
  38.             // When you specify a version of CMake, as shown below,
  39.             // the Android plugin searches for its binary within your
  40.             // PATH environmental variable.
  41.             path "CMakeLists.txt"  //path can only be set outside (in android block)
  42.  
  43.         }
  44.     }
  45.     // Specifies two flavor dimensions.
  46.     flavorDimensions "mode"
  47.     productFlavors {
  48.         loaf {
  49.             applicationId "com.loafwallet"
  50.             dimension "mode"
  51.             resValue "string", "app_name", "LoafWallet"
  52.             buildConfigField "boolean", "BITCOIN_TESTNET", "false"
  53.  
  54.             externalNativeBuild {
  55.                 cmake {
  56.                     // When you specify a version of CMake, as shown below,
  57.                     // the Android plugin searches for its binary within your
  58.                     // PATH environmental variable.
  59.                     cFlags "-DBITCOIN_TESTNET=0"
  60.                     targets "core-lib"
  61.                 }
  62.             }
  63.         }
  64.  
  65.         loafTestnet {
  66.             applicationId "com.loafwallet.testnet"
  67.             dimension "mode"
  68.             resValue "string", "app_name", "LoafWallet-testnet"
  69.             buildConfigField "boolean", "BITCOIN_TESTNET", "true"
  70.  
  71.             externalNativeBuild {
  72.                 cmake {
  73.                     // When you specify a version of CMake, as shown below,
  74.                     // the Android plugin searches for its binary within your
  75.                     // PATH environmental variable.
  76.                     cFlags "-DBITCOIN_TESTNET=1"
  77.                     targets "core-lib"
  78.                 }
  79.             }
  80.  
  81.         }
  82.  
  83.     }
  84.     lintOptions {
  85.         // set to true to turn off analysis progress reporting by lint
  86.         quiet false
  87.         explainIssues true
  88.         // if true, stop the gradle build if errors are found
  89.         abortOnError true
  90.         // if true, only report errors
  91.         ignoreWarnings false
  92.  
  93.         checkReleaseBuilds false
  94.  
  95.         disable 'MissingTranslation'
  96.     }
  97.     buildTypes {
  98.         gitUpdateModules()
  99. //        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  100.         release {
  101.             minifyEnabled = false
  102.             debuggable = false
  103.  
  104.             ndk {
  105.                 minifyEnabled = false
  106.                 debuggable = false
  107.             }
  108.         }
  109.         debug {
  110.             debuggable = true
  111.             minifyEnabled = false
  112.  
  113.             ndk {
  114.                 minifyEnabled = false
  115.                 debuggable = true
  116.             }
  117.         }
  118.  
  119.     }
  120.     compileSdkVersion 28
  121. }
  122.  
  123. task copyResDirectoryToClasses(type: Copy) {
  124.     from "${projectDir}/src/test/res"
  125.     into "${buildDir}/intermediates/classes/test/debug/res"
  126. }
  127.  
  128. gradle.projectsEvaluated {
  129.     assembleDebug.dependsOn(copyResDirectoryToClasses)
  130. }
  131.  
  132.  
  133. def gitUpdateModules() {
  134.     // ['sh', '-c', 'git submodule foreach git pull origin master'].execute().text.trim()
  135.     // getLogger().debug("gitUpdateModules done!")
  136. }
  137.  
  138. repositories {
  139.     mavenCentral()
  140.     google()
  141. }
  142.  
  143. dependencies {
  144.     implementation 'commons-io:commons-io:2.4'
  145.     implementation 'org.eclipse.jetty:jetty-webapp:9.2.19.v20160908'
  146.     implementation 'org.eclipse.jetty.websocket:websocket-server:9.2.19.v20160908'
  147.     implementation 'org.eclipse.jetty:jetty-continuation:9.2.19.v20160908'
  148.     implementation 'org.slf4j:slf4j-api:1.7.22'
  149.     implementation 'com.android.support:support-compat:28.0.0'
  150.     implementation 'com.android.support:appcompat-v7:28.0.0'
  151.     implementation 'com.android.support:design:28.0.0'
  152.     implementation 'com.android.support:gridlayout-v7:28.0.0'
  153.     implementation 'com.android.support:support-v13:28.0.0'
  154.     implementation 'com.android.support:recyclerview-v7:28.0.0'
  155.     implementation 'com.android.support:cardview-v7:28.0.0'
  156.     implementation 'com.squareup.okhttp3:okhttp:3.7.0'
  157.     implementation 'com.google.firebase:firebase-core:11.8.0'
  158.     implementation 'com.google.firebase:firebase-crash:11.8.0'
  159.     implementation 'io.sigpipe:jbsdiff:1.0'
  160.     implementation 'com.google.zxing:core:3.3.0'
  161.     implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  162.     implementation 'com.android.support.test:runner:1.0.1'
  163.     implementation 'com.android.support.test:rules:1.0.1'
  164.     implementation 'junit:junit:4.12'
  165.     implementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  166.     implementation 'tools.fastlane:screengrab:1.1.0'
  167. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top