Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build.gradle « News-Android-App - github.com/nextcloud/news-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2ab61945d2099ddec90d30a2f3af08c61343d2cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
apply plugin: 'com.android.application'

android {

    /*
    signingConfigs {
        debug {
            storeFile file("~/.android/debug.keystore")
        }
    }*/

    compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)

    testOptions.unitTests.includeAndroidResources = true

    defaultConfig {
        minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
        targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)

        //testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        testInstrumentationRunner "de.luhmer.owncloudnewsreader.CustomTestRunner"

        // The following argument makes the Android Test Orchestrator run its
        // "pm clear" command after each test invocation. This command ensures
        // that the app's state is completely cleared between tests.
        testInstrumentationRunnerArguments clearPackageData: 'true'

        vectorDrawables.useSupportLibrary = true

        versionCode 178
        versionName "0.9.9.75"
    }

    buildFeatures {
        viewBinding true
    }

    testOptions {
        execution 'ANDROIDX_TEST_ORCHESTRATOR'
        unitTests.returnDefaultValues = true
    }

    compileOptions {
        coreLibraryDesugaringEnabled true
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }

    buildTypes {
        debug {
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            testProguardFiles 'proguard-test.pro'
            pseudoLocalesEnabled true
        }
        release {
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            testProguardFiles 'proguard-test.pro'
            //signingConfig signingConfigs.debug
        }
    }



    flavorDimensions "default"

    productFlavors {
        // 100% Open-Source Edition
        oss {
            dimension "default"
        }
        // Used for continous integration, e.g. to test built .apk-files from pull requests
        dev {
            dimension "default"
            applicationIdSuffix ".dev"
        }
    }


    sourceSets {
        main {
            aidl.srcDirs = ['src/main/java']
        }
    }
    packagingOptions {
        resources {
            excludes += ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt', 'LICENSE.txt', 'META-INF/services/javax.annotation.processing.Processor']
        }
    }


    // Gradle automatically adds 'android.test.runner' as a dependency.
    useLibrary 'android.test.runner'
    useLibrary 'android.test.base'
    useLibrary 'android.test.mock'
    lint {
        abortOnError true
        checkReleaseBuilds false
        disable 'MissingTranslation', 'ExtraTranslation', 'MissingQuantity', 'InconsistentArrays', 'TypographyEllipsis'
        ignoreWarnings true
    }
    namespace 'de.luhmer.owncloudnewsreader'

}

repositories {
    mavenCentral()
    maven { url "https://jitpack.io" }
    maven { url 'https://guardian.github.io/maven/repo-releases' } //needed for com.gu:option:1.3 in Android-DirectoryChooser
}

final DAGGER_VERSION = '2.42'
final ESPRESSO_VERSION = '3.4.0'
final OKHTTP_VERSION = '3.12.13'
final MOCKITO_VERSION = '3.8.0'
final RETROFIT_VERSION = '2.9.0'

dependencies {
    // core android studio module
    // compile project(':core')
    // You must install or update the Google Repository through the SDK manager to use this dependency.
    // The Google Repository (separate from the corresponding library) can be found in the Extras category.
    // implementation 'com.google.android.gms:play-services:4.2.42'
    // implementation project(path: ':MaterialShowcaseView:library', configuration: 'default')
    // implementation project(':Android-SingleSignOn:lib')
    implementation 'com.github.nextcloud:Android-SingleSignOn:0.6.1'
    
    implementation "androidx.core:core:1.7.0"
    implementation 'androidx.annotation:annotation:1.3.0'
    implementation "androidx.appcompat:appcompat:1.4.0"
    implementation "androidx.preference:preference:1.1.1"
    implementation "androidx.media:media:1.5.0"

    // https://mvnrepository.com/artifact/com.google.android.material/material
    implementation "com.google.android.material:material:1.4.0"
    //implementation "com.google.android.material:material:1.0.0"
    implementation "androidx.palette:palette:1.0.0"
    implementation "androidx.recyclerview:recyclerview:1.1.0"
    implementation "androidx.browser:browser:1.4.0"
    implementation "androidx.cardview:cardview:1.0.0"
    //implementation 'de.mrmaffen:holocircularprogressbar:1.0.1'
    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    implementation 'com.google.code.gson:gson:2.9.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

    implementation 'com.sothree.slidinguppanel:library:3.4.0'

    implementation 'org.greenrobot:eventbus:3.2.0'
    implementation 'de.greenrobot:greendao:2.1.0'
    implementation ('de.greenrobot:greendao-generator:2.1.0') {
        exclude group: 'org.freemarker'
    }

    // implementation 'org.freemarker:freemarker:2.3.23' // Required for DAO generation
    // implementation 'org.apache.commons:commons-lang3:3.4' // Required for DAO generation


    implementation 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
    implementation 'org.jsoup:jsoup:1.14.3'
    implementation ('net.rdrei.android.dirchooser:library:3.2@aar') {
        exclude group: 'com.google.auto.value', module: 'auto-value'
        transitive = true
    }

    implementation "com.google.dagger:dagger:${DAGGER_VERSION}"
    annotationProcessor "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"

    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    // Because RxAndroid releases are few and far between, it is recommended you also
    // explicitly depend on RxJava's latest version for bug fixes and new features.
    implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
    implementation "com.squareup.retrofit2:adapter-rxjava2:$RETROFIT_VERSION"

    implementation "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"
    implementation "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"
    implementation "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
    implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP_VERSION}"

    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

    testImplementation 'junit:junit:4.13.2'
    testImplementation("org.mockito:mockito-core:$MOCKITO_VERSION") {
        exclude group: 'org.hamcrest'
    }
    testImplementation 'com.google.dexmaker:dexmaker:1.2'
    testImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
    testImplementation "com.squareup.okhttp3:mockwebserver:${OKHTTP_VERSION}"


    androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"

    // https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver
    //androidTestImplementation "com.squareup.okhttp3:mockwebserver:${OKHTTP_VERSION}"


    androidTestImplementation 'tools.fastlane:screengrab:2.1.0'
    // Add falcon:2.2.0 explicitly, because screengrab:2.1.0 relies on falcon:2.1.1 which is not available on mavenCentral
    // See https://github.com/fastlane/fastlane/issues/12651#issuecomment-849653404
    androidTestImplementation 'com.jraska:falcon:2.2.0'
    //androidTestImplementation "org.mockito:mockito-core:MOCKITO_VERSION"
    androidTestImplementation "org.mockito:mockito-android:$MOCKITO_VERSION"


    //androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
    //androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'

    testImplementation 'org.robolectric:robolectric:4.6.1'

    // Core library
    androidTestImplementation 'androidx.test:core:1.3.0'

    // AndroidJUnitRunner and JUnit Rules
    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test:rules:1.4.0'

    // Assertions
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.ext:truth:1.3.0'
    androidTestImplementation 'com.google.truth:truth:1.1.3'

    // Espresso dependencies
    androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION"
    androidTestImplementation "androidx.test.espresso:espresso-contrib:$ESPRESSO_VERSION"
    androidTestImplementation "androidx.test.espresso:espresso-intents:$ESPRESSO_VERSION"
    androidTestImplementation "androidx.test.espresso:espresso-accessibility:$ESPRESSO_VERSION"
    androidTestImplementation "androidx.test.espresso:espresso-web:$ESPRESSO_VERSION"
    androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$ESPRESSO_VERSION"

    // https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator
    androidTestUtil 'androidx.test:orchestrator:1.4.1'

    // The following Espresso dependency can be either "implementation"
    // or "androidTestImplementation", depending on whether you want the
    // dependency to appear on your APK's compile classpath or the test APK
    // classpath.
    //androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.1'
}

/*
// Workaround for https://github.com/mockito/mockito/issues/1511#issuecomment-458544398
configurations.all {
    resolutionStrategy.eachDependency { details ->
        if (details.requested.group == 'net.bytebuddy') {
            details.useVersion "1.8.22"
        }
    }
}
*/