Skip to content

armgit / haven

Public Imported from GitHub
0

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors

6.2 KB
Raw Blame
buildscript {
    ext.kotlin_version = '1.5.21'
    repositories {
        google()
        jcenter()

        maven {
            url "https://dl.bintray.com/kotlin/kotlin-eap/"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

}

/* gets the version name from the latest Git tag, stripping the leading v off */
def getVersionName = { ->
    def stdout = new ByteArrayOutputStream()
    exec {
        commandLine 'git', 'describe', '--tags', '--always', '--abbrev=0'
        standardOutput = stdout
    }
    return stdout.toString().trim()
}



apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

//apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

repositories {
    google()
    jcenter()
    maven { url 'https://jitpack.io' }
    maven {
        url "https://dl.bintray.com/kotlin/kotlin-eap/"
    }
}

allprojects {
    project.ext {
        // these are common variables used in */build.gradle
        version_number = getVersionName()
        group_info = "haven"
        buildToolsVersion = "30.0.2"
        minSdkVersion = 16
        targetSdkVersion = 30
    }

    /**
    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:unchecked"
        }
    }**/
}


android {
    compileSdkVersion 30
    buildToolsVersion = '30.0.3'

    buildFeatures {
        viewBinding true
    }

    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

    dexOptions {
        javaMaxHeapSize "2g"
        preDexLibraries true
    }


    defaultConfig {
        applicationId "org.havenapp.main"
        versionCode 2001
        versionName getVersionName()
        archivesBaseName = "Haven-$versionName"
        minSdkVersion 16
        targetSdkVersion 30
        ndkVersion '21.3.6528147'
        //ndkPath '/home/n8fr8/Android/Ndk'
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true

        //   renderscriptTargetApi 16
        //   renderscriptSupportModeEnabled true

        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86", 'arm64-v8a'
        }

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        // clear app state completely between tests
        testInstrumentationRunnerArguments clearPackageData: 'true'

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }

    }


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    sourceSets {
        androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
    }
}

configurations {
    all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.annotation:annotation:1.2.0'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.wdullaer:materialdatetimepicker:4.2.3'
    implementation 'com.github.guardianproject:signal-cli-android:v0.6.0-android-beta-1'
    implementation 'net.the4thdimension:audio-wife:1.0.3'
    implementation 'com.github.AppIntro:AppIntro:5.1.0'
    implementation 'info.guardianproject.netcipher:netcipher:2.1.0'
    implementation 'org.nanohttpd:nanohttpd-webserver:2.3.1'
    implementation 'me.angrybyte.picker:picker:1.3.1'
    implementation 'com.github.stfalcon:frescoimageviewer:0.5.0'
    implementation 'com.facebook.fresco:fresco:2.0.0'
    implementation 'com.github.derlio:audio-waveform:v1.0.1'
    implementation 'com.maxproj.simplewaveform:app:1.0.0'
    implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.24'
    implementation('com.mikepenz:aboutlibraries:7.0.3@aar') {
        transitive = true
    }

    implementation 'com.github.halilozercan:BetterVideoPlayer:1.1.0'
    implementation 'com.github.ybq:Android-SpinKit:1.4.0'
    implementation 'io.github.silvaren:easyrs:0.5.3'
    // jcodec's pure-java video coding replaced by android system encoding
    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.21"

    // Room

    implementation "androidx.room:room-runtime:2.3.0"
    kapt "androidx.room:room-compiler:2.3.0"
    implementation "androidx.room:room-ktx:2.3.0"


    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"


    // Test helpers
    testImplementation "androidx.room:room-testing:2.3.0"
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test:core:1.4.0'
    androidTestImplementation 'androidx.test:rules:1.4.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
    androidTestImplementation "androidx.room:room-testing:2.3.0"

    // android-job
    implementation 'com.evernote:android-job:1.4.2'

    // new camera view: https://github.com/natario1/CameraView
    implementation 'com.otaliastudios:cameraview:2.6.4'


}