└── README.md /README.md: -------------------------------------------------------------------------------- 1 | ## Issues and Solutions after upgrading Gradle to 4.0-milestone and Gradle plugin to 3.0.0.-alpha1 2 | 3 | 4 | 5 | ### unmock plugin cannot find Android jar. 6 | 7 | Upgrade to version 0.6.1 of umock plugin. 8 | 9 | See https://github.com/bjoernQ/unmock-plugin/issues/31 10 | 11 | 12 | 13 | ### CircleCI cannot find Play Services, Support Library and Contraint Layout 14 | 15 | Grab them manually thru android tools. 16 | 17 | ``` 18 | echo y | android update sdk --no-ui --all --filter "tools,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository" 19 | ``` 20 | The `android` tool does not have access to ConstrainsLayout package but `sdkmanager` does. 21 | 22 | ``` 23 | echo y | /usr/local/android-sdk-linux/tools/bin/sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" 24 | ``` 25 | 26 | 27 | ### Apollo Android Library: class file for com.apollographql.apollo.api.Operation not found 28 | 29 | https://github.com/apollographql/apollo-android/ 30 | 31 | Our shared module has the generated GraphQL classes. However, when you using GraphQL in the our app module, we are getting the error. The solution was to apply the plugin to the `build.gradle` file of the app module as well. 32 | 33 | ``` 34 | app/build.gradle 35 | 36 | apply plugin: 'com.android.application' 37 | apply plugin: 'com.apollographql.android' 38 | ``` 39 | 40 | ### For renaming APK, cannot rename output files since they are now read-only. 41 | 42 | Use `archivesBaseName` in the build type 43 | 44 | ``` 45 | debug { 46 | signingConfig signingConfigs.debugSignConfig 47 | applicationIdSuffix ".debug" 48 | archivesBaseName = "app-$defaultConfig.versionName" 49 | } 50 | ``` 51 | 52 | 53 | ### Error with Autovalue Annotations 54 | 55 | Add workaround to android > default config in the app's `build.gradle` 56 | 57 | ``` 58 | android { 59 | ... 60 | defaultConfig { 61 | minSdkVersion minSdkVersionValue 62 | targetSdkVersion compileSdkVersionValue 63 | versionCode 1 64 | versionName "1.0" 65 | multiDexEnabled true 66 | 67 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 68 | 69 | javaCompileOptions { 70 | annotationProcessorOptions { 71 | includeCompileClasspath false 72 | } 73 | } 74 | } 75 | ... 76 | } 77 | ``` 78 | 79 | --------------------------------------------------------------------------------