build.gradle 4.48 KB
apply plugin: 'com.android.application'

android {

    def version = "1.0.0"
    def getVersionName = { ->
        return "20230927"
    }
    def vcode = 1

    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.sw.laryngoscope"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode vcode
        versionName "V" + version  + "_" + getVersionName()

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
        ndk {
            abiFilters 'armeabi-v7a', "arm64-v8a"
        }
    }

    signingConfigs {
        debug {
            keyAlias 'androiddebugkey'
            keyPassword 'android'
            storeFile file('./AOSP.keystore')
            storePassword 'android'
        }
        relase {
            keyAlias 'androiddebugkey'
            keyPassword 'android'
            storeFile file('./AOSP.keystore')
            storePassword 'android'
        }
    }

    buildTypes {
        release {
            // 混淆
            minifyEnabled false
            /*// Zipalign优化
            zipAlignEnabled true
            // 移除无用的resource文件
            shrinkResources true*/
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.relase
        }
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    //自动生成指定名称的release发布版的 apk文件
    android.applicationVariants.all { variant ->
        def appName
        if (project.hasProperty("applicationName")) {
            appName = applicationName
        } else {
            appName = parent.name
        }
        variant.outputs.all { output ->
            outputFileName = appName + "_V" + version + "_" + getVersionName() + ".apk"
        }
    }

    sourceSets {
        main {
            //jniLibs.srcDir 'src/main/jniLibs'
        }
    }
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    packagingOptions {
        //exclude 'lib/armeabi-v7a/libc++_shared.so' // 过滤该文件
    }

}

String getDate() {
    Date date = new Date();
    return date.format("MMM dd yyyy HH:mm:ss", Locale.ENGLISH);
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'org.jetbrains:annotations:15.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'com.google.android.material:material:1.2.1'

    //noinspection GradleCompatible
    implementation 'com.android.support:recyclerview-v7:23.4.0'
    implementation files('libs/org.litepal.guolin_3.2.3.jar')


    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.squareup.okhttp3:okhttp:4.1.0'
    implementation 'com.squareup.okio:okio:1.9.0'


    implementation('com.jakewharton:butterknife:10.0.0') {
        exclude group: 'com.android.support'
    }
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'

    implementation 'com.github.bumptech.glide:glide:4.0.0'
    implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'

    //implementation files('libs\\photoview.jar')
    implementation 'com.itextpdf:itext7-core:7.1.13'
    implementation 'com.github.barteksc:android-pdf-viewer:2.5.1'
    //implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'

    implementation files('libs\\signature-pad.jar')
    implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
    implementation files('libs\\dcm4che-core-5.27.0.jar')
    implementation files('libs\\dcm4che-net-5.27.0.jar')
	
    implementation project(":ffmpeg")
    implementation files('libs\\wifilibrary.jar')

	
    compileOnly files('syslibs/framework.jar')


}