Blame view

warply_android_sdk/build.gradle 5.54 KB
1 2
apply plugin: 'com.android.library'

3 4
ext {
    PUBLISH_GROUP_ID = 'ly.warp'
5
    PUBLISH_VERSION = '4.5.5.4r43'
6 7 8 9 10
    PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}

apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"

11
android {
12 13
    compileSdkVersion 34
    buildToolsVersion "34.0.0"
14

Panagiotis Triantafyllou authored
15 16
    useLibrary 'org.apache.http.legacy'

17 18
    defaultConfig {
        minSdkVersion 23
19
        targetSdkVersion 34
20
        consumerProguardFiles 'proguard-rules.pro'
Panagiotis Triantafyllou authored
21
        vectorDrawables.useSupportLibrary = true
22
    }
23 24 25 26 27 28 29 30
    splits {
        abi {
            reset()
            enable false
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
31 32 33 34
    lintOptions {
        abortOnError false
    }

35 36 37 38 39 40
    sourceSets {
        main {
            jniLibs.srcDirs = ['src/main/jniLibs']
        }
    }

41 42
    buildTypes {
        release {
Panagiotis Triantafyllou authored
43
            minifyEnabled false
44 45 46 47 48 49 50
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    //------------------------------ Support -----------------------------//
51
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
52 53 54
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'androidx.cardview:cardview:1.0.0'
Panagiotis Triantafyllou authored
55 56
    api "androidx.security:security-crypto:1.1.0-alpha03"
    // For minSDK 23 use 1.0.0, for minSDK 21 use 1.1.0 that is currently in alpha
57 58
    api 'org.altbeacon:android-beacon-library:2.19.3'
    api 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
59
    implementation 'de.hdodenhof:circleimageview:3.1.0'
60
    api group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.2.21'
61
    implementation 'com.google.android.material:material:1.5.0'
62 63
    api group: 'com.google.zxing', name: 'core', version: '3.4.1'
    api group: 'com.google.zxing', name: 'javase', version: '3.4.1'
Panagiotis Triantafyllou authored
64
    api 'com.github.siyamed:android-shape-imageview:0.9.3'
65
    implementation 'org.greenrobot:eventbus:3.3.1'
Panagiotis Triantafyllou authored
66
    api 'org.apmem.tools:layouts:1.10'
67
    api 'com.google.guava:guava:30.1-android'
68 69 70

    //------------------------------ Firebase -----------------------------//
    api platform('com.google.firebase:firebase-bom:29.0.3')
Panagiotis Triantafyllou authored
71 72 73
    implementation('com.google.firebase:firebase-messaging') {
        exclude group: 'com.google.android.gms', module: 'play-services-location'
    }
74 75

    //------------------------------ GMS -----------------------------//
Panagiotis Triantafyllou authored
76
    api 'com.google.android.gms:play-services-base:18.1.0'
Panagiotis Triantafyllou authored
77 78
    implementation 'com.google.android.gms:play-services-location:19.0.1'
    implementation 'com.google.android.gms:play-services-maps:18.0.2'
79
    api 'com.google.maps.android:android-maps-utils:0.5'
80 81 82 83 84

    //------------------------------ Work Manager -----------------------------//
    api 'androidx.work:work-runtime:2.7.1'

    //------------------------------ Glide -----------------------------//
85
    implementation 'com.github.bumptech.glide:glide:4.12.0'
86 87 88
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    //------------------------------ Huawei -----------------------------//
Panagiotis Triantafyllou authored
89
    implementation 'com.huawei.agconnect:agconnect-core:1.7.2.300'
90 91 92
    implementation 'com.huawei.hms:base:6.6.0.300'
    implementation 'com.huawei.hms:push:6.7.0.300'
    implementation 'com.huawei.hms:ads-identifier:3.4.56.300'
Panagiotis Triantafyllou authored
93 94
    implementation 'com.huawei.hms:maps:6.9.0.300'
    implementation 'com.huawei.hms:maps-basic:6.9.0.300'
95 96

    //------------------------------ SQLCipher -----------------------------//
97
    api "net.zetetic:android-database-sqlcipher:4.5.2"
98
    api "androidx.sqlite:sqlite:2.2.0"
99
    api 'com.getkeepsafe.relinker:relinker:1.4.4'
100 101

    //------------------------------ Calligraphy -----------------------------//
102 103
//    api 'io.github.inflationx:calligraphy3:3.1.1'
//    api 'io.github.inflationx:viewpump:2.0.3'
Panagiotis Triantafyllou authored
104 105 106 107

    //------------------------------ Retrofit -----------------------------//
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
108

109 110
    //------------------------------ Lifecycle -----------------------------//
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
111 112 113

    //------------------------------ Retrofit Logs -----------------------------//
//    implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
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
}

// In every export please update the version number
task deleteJarLibrary(type: Delete) {
    delete 'jar/warply_android_sdk_v4.5.0.jar'
}

//from('build/intermediates/compile_library_classes/release/')

//Old version
// Gradle Tasks -> warply_android_sdk -> Tasks -> other -> createJarLibrary
//task createJarLibrary(type: Copy) {
//    from fileTree('build/intermediates/bundles/release/')
//    into('jar/')
//    include('classes.jar')
//    rename('classes.jar', 'warply_android_sdk_v4.4.2.jar')
//}

// New version
// Gradle -> warplyDemo -> libraries -> warply_android_sdk -> Run Configurations -> assembleRelease
// When finished it copies the .jar into
// warply_android_sdk -> build -> intermediates -> full_jar -> release/debug -> full.jar

// 24 - Jan - 2022
// Gradle -> warplyDemo -> libraries -> warply_android_sdk -> Tasks -> build -> build
// When finished it copies the .aar into
// warply_android_sdk -> build -> outputs -> aar -> warply_android_sdk-release.aar

task createJarLibrary(type: Jar, dependsOn: 'assembleRelease') {
    from fileTree('build/intermediates/bundles/release/')
}

createJarLibrary.dependsOn(deleteJarLibrary, build)