Open-source alternative Instagram client on Android. More maintainers needed!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
5.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
  1. apply plugin: 'com.android.application'
  2. apply plugin: "androidx.navigation.safeargs"
  3. apply from: 'sentry.gradle'
  4. def getGitHash = { ->
  5. def stdout = new ByteArrayOutputStream()
  6. exec {
  7. commandLine 'git', 'rev-parse', '--short', 'HEAD'
  8. standardOutput = stdout
  9. }
  10. return stdout.toString().trim()
  11. }
  12. android {
  13. compileSdkVersion 29
  14. defaultConfig {
  15. applicationId 'me.austinhuang.instagrabber'
  16. minSdkVersion 21
  17. targetSdkVersion 29
  18. versionCode 60
  19. versionName '19.1.0'
  20. multiDexEnabled true
  21. vectorDrawables.useSupportLibrary = true
  22. vectorDrawables.generatedDensities = []
  23. javaCompileOptions {
  24. annotationProcessorOptions {
  25. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  26. }
  27. }
  28. }
  29. compileOptions {
  30. // Flag to enable support for the new language APIs
  31. coreLibraryDesugaringEnabled true
  32. targetCompatibility JavaVersion.VERSION_1_8
  33. sourceCompatibility JavaVersion.VERSION_1_8
  34. }
  35. buildFeatures { viewBinding true }
  36. aaptOptions { additionalParameters '--no-version-vectors' }
  37. buildTypes {
  38. debug {
  39. minifyEnabled true
  40. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  41. }
  42. release {
  43. minifyEnabled true
  44. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  45. }
  46. }
  47. flavorDimensions "repo"
  48. productFlavors {
  49. github {
  50. dimension "repo"
  51. // versionNameSuffix "-github" // appended in assemble task
  52. buildConfigField("String", "dsn", SENTRY_DSN)
  53. }
  54. fdroid {
  55. dimension "repo"
  56. versionNameSuffix "-fdroid"
  57. }
  58. }
  59. android.applicationVariants.all { variant ->
  60. if (variant.flavorName != "github") return
  61. variant.outputs.all { output ->
  62. def builtType = variant.buildType.name
  63. def versionName = variant.versionName
  64. // def versionCode = variant.versionCode
  65. def flavor = variant.flavorName
  66. def suffix = "${versionName}-${flavor}_${builtType}" // eg. 19.1.0-github_debug or release
  67. if (builtType.toString() == 'release' && project.hasProperty("pre")) {
  68. // append latest commit short hash for pre-release
  69. suffix = "${versionName}.${getGitHash()}-${flavor}" // eg. 19.1.0.b123456-github
  70. }
  71. output.versionNameOverride = suffix
  72. outputFileName = "barinsta_${suffix}.apk"
  73. }
  74. }
  75. }
  76. configurations.all {
  77. resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
  78. }
  79. dependencies {
  80. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
  81. def appcompat_version = "1.2.0"
  82. def nav_version = '2.3.4'
  83. def exoplayer_version = '2.13.2'
  84. implementation 'com.google.android.material:material:1.4.0-alpha01'
  85. implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
  86. implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version"
  87. implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayer_version"
  88. implementation "androidx.appcompat:appcompat:$appcompat_version"
  89. implementation "androidx.appcompat:appcompat-resources:$appcompat_version"
  90. implementation "androidx.recyclerview:recyclerview:1.2.0-rc01"
  91. implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
  92. implementation "androidx.viewpager2:viewpager2:1.0.0"
  93. implementation "androidx.navigation:navigation-fragment:$nav_version"
  94. implementation "androidx.navigation:navigation-ui:$nav_version"
  95. implementation "androidx.constraintlayout:constraintlayout:2.0.4"
  96. implementation "androidx.preference:preference:1.1.1"
  97. implementation "androidx.work:work-runtime:2.5.0"
  98. implementation 'androidx.palette:palette:1.0.0'
  99. implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
  100. implementation 'com.google.guava:guava:27.0.1-android'
  101. // Room
  102. def room_version = "2.2.6"
  103. implementation "androidx.room:room-runtime:$room_version"
  104. implementation "androidx.room:room-guava:$room_version"
  105. annotationProcessor "androidx.room:room-compiler:$room_version"
  106. // CameraX
  107. def camerax_version = "1.1.0-alpha03"
  108. implementation "androidx.camera:camera-camera2:$camerax_version"
  109. implementation "androidx.camera:camera-lifecycle:$camerax_version"
  110. implementation "androidx.camera:camera-view:1.0.0-alpha22"
  111. // EmojiCompat
  112. def emoji_compat_version = "1.1.0"
  113. implementation "androidx.emoji:emoji:$emoji_compat_version"
  114. implementation "androidx.emoji:emoji-appcompat:$emoji_compat_version"
  115. implementation 'me.austinhuang:AutoLinkTextViewV2:-SNAPSHOT'
  116. implementation 'com.facebook.fresco:fresco:2.3.0'
  117. implementation 'com.facebook.fresco:animated-webp:2.3.0'
  118. implementation 'com.facebook.fresco:webpsupport:2.3.0'
  119. implementation 'com.squareup.retrofit2:retrofit:2.9.0'
  120. implementation 'com.squareup.retrofit2:converter-scalars:2.9.0'
  121. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  122. implementation 'org.apache.commons:commons-imaging:1.0-alpha2'
  123. implementation 'com.github.ammargitham:uCrop:2.3-native-beta-2'
  124. implementation 'com.github.ammargitham:android-gpuimage:2.1.1-beta4'
  125. debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
  126. githubImplementation 'io.sentry:sentry-android:4.3.0'
  127. testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
  128. }