Advertisement
amrutpurandare

build.gradle

Jan 7th, 2016
1,217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.88 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. maven { url 'http://download.crashlytics.com/maven' }
  5. }
  6. dependencies {
  7. classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.16.0'
  8. classpath 'com.android.tools.build:gradle:1.5.0'
  9. }
  10. }
  11. apply plugin: 'com.android.application'
  12. //Since this project is an Android app, the build.gradle file utilises the Android plugin.//
  13.  
  14. apply plugin: 'crashlytics'
  15. apply plugin: 'jacoco'
  16.  
  17. repositories {
  18. mavenCentral()
  19. maven { url 'http://download.crashlytics.com/maven' }
  20.  
  21. flatDir {
  22. dirs 'aars'
  23. }
  24. }
  25.  
  26. android {
  27. // configures all our project’s Android-specific parameters, and tells Gradle which version of Android it should build your project with.
  28. // If you’ve developed Android applications before, the following should all be familiar.//
  29.  
  30. compileSdkVersion 23 // The api project is targeting
  31. buildToolsVersion '23.0.2' // version of build tools we're using
  32.  
  33. testBuildType "coverage"
  34.  
  35. // added by amrut to support apace HttpClient in android 6.0
  36. useLibrary 'org.apache.http.legacy'
  37.  
  38. dexOptions {
  39. incremental true
  40. javaMaxHeapSize "2048M"
  41. }
  42.  
  43. // different versions of the same application
  44. // different dimentsions than build types
  45. // This is combined with buildtypes
  46. productFlavors {
  47. def STRING = "String"
  48. def BOOLEAN = "boolean"
  49. def LANGUAGE = "language"
  50. def CLUSTER = "cluster"
  51. def TRUE = "true"
  52. def FALSE = "false"
  53. def GCM_SENDER = "gcm_sender"
  54. def UA_DEV_KEY = "ua_dev_key"
  55. def UA_DEV_SECRET = "ua_dev_secret"
  56. def UA_PROD_KEY = "ua_prod_key"
  57. def UA_PROD_SECRET = "ua_prod_secret"
  58.  
  59. def INMOBI_PROPERTY_ID = "inmobi_property_id"
  60.  
  61. def CLIENT_ID = "clientId"
  62. def CLIENT_SECRET = "clientSecret"
  63.  
  64. def HAS_TOP_SITE_SECTION = "top_site_section"
  65. def HAS_ONBOARDING = "has_onboarding"
  66.  
  67.  
  68. plainCheez {
  69. applicationId "com.cheezburger.icanhas"
  70. buildConfigField STRING, LANGUAGE, "\"[\\\"en\\\"]\""
  71. buildConfigField STRING, CLUSTER, "\"cheezburger\""
  72.  
  73. buildConfigField STRING, GCM_SENDER, "\"208614212457\""
  74. buildConfigField STRING, UA_DEV_KEY, "\"PYz6KyQGRmCy1KvGbrhtgg\""
  75. buildConfigField STRING, UA_DEV_SECRET, "\"oYJauGtqSyCVfeYK2JoN2A\""
  76. buildConfigField STRING, UA_PROD_KEY, "\"KNOjpN0KSDeijz5_evW7cQ\""
  77. buildConfigField STRING, UA_PROD_SECRET, "\"vRld-Ss8Q6S8AwXaLBJDsA\""
  78.  
  79. buildConfigField STRING, INMOBI_PROPERTY_ID, "\"903366710ef142dcac8e9986e0c3a897\""
  80.  
  81. buildConfigField STRING, CLIENT_ID, "\"729fef12049d485ca4cfdf5441be9196\""
  82. buildConfigField STRING, CLIENT_SECRET, "\"5c5dfd67753a4c1f868cb1e11afe4533\""
  83.  
  84. buildConfigField BOOLEAN, HAS_TOP_SITE_SECTION, TRUE
  85. buildConfigField BOOLEAN, HAS_ONBOARDING, TRUE
  86.  
  87. }
  88. amazonCheez {
  89. applicationId "com.cheezburger.icanhas"
  90. buildConfigField STRING, LANGUAGE, "\"[\\\"en\\\"]\""
  91. buildConfigField STRING, CLUSTER, "\"cheezburger\""
  92.  
  93. buildConfigField STRING, GCM_SENDER, "\"208614212457\""
  94. buildConfigField STRING, UA_DEV_KEY, "\"PYz6KyQGRmCy1KvGbrhtgg\""
  95. buildConfigField STRING, UA_DEV_SECRET, "\"oYJauGtqSyCVfeYK2JoN2A\""
  96. buildConfigField STRING, UA_PROD_KEY, "\"KNOjpN0KSDeijz5_evW7cQ\""
  97. buildConfigField STRING, UA_PROD_SECRET, "\"vRld-Ss8Q6S8AwXaLBJDsA\""
  98.  
  99. buildConfigField STRING, CLIENT_ID, "\"729fef12049d485ca4cfdf5441be9196\""
  100. buildConfigField STRING, CLIENT_SECRET, "\"5c5dfd67753a4c1f868cb1e11afe4533\""
  101.  
  102. buildConfigField BOOLEAN, HAS_TOP_SITE_SECTION, TRUE
  103. buildConfigField BOOLEAN, HAS_ONBOARDING, TRUE
  104.  
  105. }
  106.  
  107. spanishCheez {
  108. applicationId "com.cheezburger.icanhas.espanol"
  109. buildConfigField STRING, LANGUAGE, "\"[\\\"es\\\"]\""
  110. buildConfigField STRING, CLUSTER, "\"loquillo\""
  111.  
  112. buildConfigField STRING, GCM_SENDER, "\"208614212457\""
  113. buildConfigField STRING, UA_DEV_KEY, "\"PL1pIZBVRA-w1oeRsxHmgA\""
  114. buildConfigField STRING, UA_DEV_SECRET, "\"Pk7anFcwRf2jBeMOxvDd2A\""
  115. buildConfigField STRING, UA_PROD_KEY, "\"g9Ou9lWdRfaAbnMIeFW_CQ\""
  116. buildConfigField STRING, UA_PROD_SECRET, "\"0vo6gybYSwKdPJXElrFXGg\""
  117.  
  118. buildConfigField STRING, CLIENT_ID, "\"492fef120ccd485da4cdfd1441ce7116\""
  119. buildConfigField STRING, CLIENT_SECRET, "\"2a444a673aab1f868e87cde22afe4538\""
  120.  
  121. buildConfigField BOOLEAN, HAS_TOP_SITE_SECTION, FALSE
  122. buildConfigField BOOLEAN, HAS_ONBOARDING, FALSE
  123.  
  124. }
  125. }
  126.  
  127. defaultConfig {
  128. minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
  129. targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
  130. versionCode 90
  131. versionName "2.0.90"
  132. testInstrumentationRunner "android.support.multidex.MultiDexTestRunner"
  133. multiDexEnabled true
  134. }
  135.  
  136. signingConfigs {
  137. debug {
  138. storeFile file("jenkinsdebug.keystore")
  139. }
  140. }
  141.  
  142. packagingOptions {
  143. exclude 'META-INF/DEPENDENCIES'
  144. exclude 'META-INF/NOTICE'
  145. exclude 'META-INF/LICENSE'
  146. exclude 'META-INF/LICENSE.txt'
  147. exclude 'META-INF/NOTICE.txt'
  148. }
  149. compileOptions {
  150. sourceCompatibility JavaVersion.VERSION_1_7
  151. targetCompatibility JavaVersion.VERSION_1_7
  152. }
  153.  
  154. buildTypes {
  155.  
  156. //‘BuildTypes’ controls how our app is built and packaged. If we want to create our own build variants,
  157. // we’ll need to add them to this section.//
  158.  
  159. def BOOLEAN = "boolean"
  160. def STRING = "String"
  161. def TRUE = "true"
  162. def FALSE = "false"
  163. def DEBUG_NETWORK = "debugNetwork"
  164. def RELEASE = "release"
  165. def SERVER_URL = "serverUrl"
  166. def ECHO_URL = "echoUrl"
  167. def COMMENT_DOMAIN = "commentDomain"
  168. def UA_IS_PRODUCTION = "ua_is_production"
  169.  
  170. //Gradle runs ProGuard during the build process.//
  171.  
  172. release {
  173. minifyEnabled true
  174. //Applies the default ProGuard settings from the Android SDK.//
  175. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules-new.pro', 'proguard/proguard-samsung-only.pro', 'proguard/proguard-crashlytics.pro', 'proguard/proguard-facebook.pro', 'proguard/proguard-google-play-services.pro', 'proguard/proguard-gson.pro', 'proguard/proguard-joda-time.pro', 'proguard/proguard-square-retrofit.pro', 'proguard/proguard-google-admob.pro', 'proguard/proguard-sharethrough.pro', 'proguard/proguard-urban-airship.pro', 'proguard/proguard-kryo.pro', 'proguard/proguard-roboguice.pro', 'proguard/proguard-samsung.pro', 'proguard/proguard-comscore.pro'
  176. buildConfigField BOOLEAN, DEBUG_NETWORK, FALSE
  177. buildConfigField BOOLEAN, RELEASE, TRUE
  178. buildConfigField STRING, SERVER_URL, "\"https://apiv2.cheezburger.com/v2\""
  179. buildConfigField STRING, ECHO_URL, "\"http://s.chzbgr.com/echo?\""
  180. buildConfigField STRING, COMMENT_DOMAIN, "\".cheezburger.com\""
  181. buildConfigField BOOLEAN, UA_IS_PRODUCTION, TRUE
  182. debuggable false
  183. }
  184. stage {
  185. versionNameSuffix '-STAGE'
  186. minifyEnabled false
  187. buildConfigField BOOLEAN, DEBUG_NETWORK, TRUE
  188. buildConfigField BOOLEAN, RELEASE, FALSE
  189. buildConfigField STRING, SERVER_URL, "\"https://test-apiv2-01.cloudapp.net/v2\""
  190. buildConfigField STRING, ECHO_URL, "\"http://s.chzbgr.com/echo?\""
  191. buildConfigField STRING, COMMENT_DOMAIN, "\".cheezburger.com\""
  192.  
  193. buildConfigField BOOLEAN, UA_IS_PRODUCTION, FALSE
  194. debuggable true
  195. }
  196. debug {
  197. versionNameSuffix '-DEBUG'
  198. minifyEnabled false
  199. // testCoverageEnabled true
  200. buildConfigField BOOLEAN, DEBUG_NETWORK, TRUE
  201. buildConfigField BOOLEAN, RELEASE, FALSE
  202. buildConfigField STRING, SERVER_URL, "\"https://test-apiv2-01.cloudapp.net/v2\""
  203. buildConfigField STRING, ECHO_URL, "\"http://s.chzbgr.com/echo?\""
  204. buildConfigField STRING, COMMENT_DOMAIN, "\".cheezburger.com\""
  205. buildConfigField BOOLEAN, UA_IS_PRODUCTION, FALSE
  206. debuggable true
  207. }
  208. coverage {
  209. versionNameSuffix '-COVERAGE'
  210. minifyEnabled false
  211. testCoverageEnabled true
  212. buildConfigField BOOLEAN, DEBUG_NETWORK, TRUE
  213. buildConfigField BOOLEAN, RELEASE, FALSE
  214. buildConfigField STRING, SERVER_URL, "\"https://test-apiv2-01.cloudapp.net/v2\""
  215. buildConfigField STRING, ECHO_URL, "\"http://s.chzbgr.com/echo?\""
  216. buildConfigField STRING, COMMENT_DOMAIN, "\".cheezburger.com\""
  217. buildConfigField BOOLEAN, UA_IS_PRODUCTION, FALSE
  218. debuggable true
  219. signingConfig signingConfigs.debug
  220. }
  221. }
  222.  
  223. lintOptions {
  224. //checkReleaseBuilds false
  225. // Or, if you prefer, you can continue to check for errors in release builds,
  226. // but continue the build even when errors are found:
  227. abortOnError false
  228. }
  229.  
  230. jacoco {
  231. version = '0.7.2.201409121644'
  232. }
  233.  
  234. }
  235.  
  236. def coverageSourceDirs = [
  237. '../app/src/main/java'
  238. ]
  239.  
  240. task jacocoTestReport(type: JacocoReport, dependsOn: "connectedAndroidTest") {
  241. group = "Reporting"
  242.  
  243. description = "Generate Jacoco coverage reports"
  244.  
  245. classDirectories = fileTree(
  246. dir: '../app/build/intermediates/classes/coverage',
  247. excludes: ['**/R.class',
  248. '**/R$*.class',
  249. '**/*$ViewInjector*.*',
  250. '**/BuildConfig.*',
  251. '**/Manifest*.*']
  252. )
  253.  
  254. //additionalSourceDirs = files(coverageSourceDirs)
  255. sourceDirectories = files(coverageSourceDirs)
  256. executionData = files('../app/build/outputs/code-coverage/connected/coverage.ec')
  257.  
  258. reports {
  259. xml.enabled = true
  260. html.enabled = true
  261. }
  262.  
  263. }
  264.  
  265.  
  266. apply plugin: 'com.android.application'
  267. dependencies {
  268.  
  269. // Although we can add JAR files by compiling them individually, this can be time-consuming if we've lots of JARs.
  270. // In this example, we’re telling Gradle to add all the JAR files in the app/libs folder.//
  271.  
  272. compile fileTree(dir: 'libs', include: ['*.jar'])
  273. androidTestCompile 'com.android.support:multidex-instrumentation:1.0.1'
  274. //Android Support Libs
  275.  
  276. //Networking Lib
  277.  
  278. //Image Lib
  279.  
  280. //Time Handling
  281.  
  282. //Better String Handling
  283.  
  284. //Event Bus
  285.  
  286. //Utils Classes
  287.  
  288. //Better String Handling
  289. compile 'com.squareup.phrase:phrase:1.0.3'
  290. //Event Bus
  291.  
  292. //Using with Retrofit (experiment)
  293.  
  294. //compile 'com.netflix.rxjava:rxjava-android:0.+'
  295.  
  296. //Image Zoom
  297.  
  298. //Key Value Database
  299.  
  300. //Facebook
  301. compile project(':paralloid')
  302. compile project(':mASTAdView')
  303. //Builder
  304. plainCheezCompile project(path: ':builder', configuration: 'cheezburgerRelease')
  305. spanishCheezCompile project(path: ':builder', configuration: 'loquilloRelease')
  306. amazonCheezCompile project(path: ':builder', configuration: 'cheezburgerRelease')
  307. compile project(':builder')
  308. //circle image view
  309.  
  310. //circle progress view
  311.  
  312. //urban airship
  313.  
  314. //apptentive
  315.  
  316. //Apptentive
  317.  
  318. // Dependency injection
  319. provided 'org.roboguice:roboblender:3.0.1'
  320. // MultiDex
  321. compile(name: 'sharethrough-android-sdk', ext: 'aar')
  322. compile files('libs/comscore.jar')
  323. //Chromecast
  324.  
  325. // to get around https://code.google.com/p/android/issues/detail?id=52962, we need to
  326.  
  327. // depend on both debug and release versions of the library
  328. releaseCompile project(path: ':CastCompanionLibrary-android', configuration: 'release')
  329. debugCompile project(path: ':CastCompanionLibrary-android', configuration: 'debug')
  330. coverageCompile project(path: ':CastCompanionLibrary-android', configuration: 'debug')
  331. stageCompile project(path: ':CastCompanionLibrary-android', configuration: 'debug')
  332. compile files('libs/FlurryAnalytics-5.6.0.jar')
  333. compile 'com.android.support:appcompat-v7:23.1.1'
  334. compile 'com.android.support:cardview-v7:23.1.1'
  335. compile 'com.android.support:recyclerview-v7:23.1.1'
  336. compile 'com.squareup.retrofit:retrofit:1.9.0'
  337. compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
  338. compile 'com.squareup.okhttp:okhttp:2.4.0'
  339. compile 'com.github.bumptech.glide:glide:3.6.0'
  340. compile 'com.github.bumptech.glide:okhttp-integration:1.3.0'
  341. compile 'joda-time:joda-time:2.3'
  342. compile 'com.squareup.phrase:phrase:1.0.3'
  343. compile 'com.squareup:otto:1.3.7'
  344. compile 'org.apache.commons:commons-lang3:3.3.1'
  345. compile 'com.github.chrisbanes.photoview:library:1.2.3'
  346. compile 'com.snappydb:snappydb-lib:0.5.0'
  347. compile 'com.esotericsoftware.kryo:kryo:2.24.0'
  348. compile 'com.facebook.android:facebook-android-sdk:3.20.0'
  349. compile 'de.hdodenhof:circleimageview:1.2.1'
  350. compile 'com.github.castorflex.smoothprogressbar:library-circular:1.0.0'
  351. compile 'com.crashlytics.android:crashlytics:1.1.13'
  352. compile 'com.urbanairship:urbanairship-lib:5.1.2@aar'
  353. compile 'com.google.android.gms:play-services-base:8.4.0'
  354. compile 'com.apptentive:apptentive-android:1.6.6@aar'
  355. compile 'com.etsy.android.grid:library:1.0.5'
  356. compile 'org.roboguice:roboguice:3.0.1'
  357. compile 'com.android.support:multidex:1.0.1'
  358. compile 'org.jsoup:jsoup:1.8.1'
  359. compile 'com.google.android.gms:play-services-ads:8.4.0'
  360. compile 'com.google.android.gms:play-services-gcm:8.4.0'
  361. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement