Nekonium公式フォーラム

Home » Nekonium公式フォーラム
投稿やトピックを作成するには↑からログインしてください。

Build.Gradle


import org.apache.tools.ant.taskdefs.condition.Os

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    flavorDimensions "default"
    defaultConfig {
        applicationId "org.nekonium.androidnuko"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 26
        versionName "1.35"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        targetCompatibility 1.7
        sourceCompatibility 1.7
    }

    packagingOptions {
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/notice'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/rxjava.properties'
    }

    lintOptions {
        disable 'MissingTranslation'
    }

    productFlavors {
        googleplay {
        }

        fdroid {
        }
    }

    task ndkBuild(type: Exec) {
        def rootDir = project.rootDir
        def localProperties = new File(rootDir, "local.properties")
        Properties properties = new Properties()
        localProperties.withInputStream { instr ->
            properties.load(instr)
        }
        def ndkDir = properties.getProperty('ndk.dir')

        if (Os.isFamily(Os.FAMILY_WINDOWS)) {
            commandLine ndkDir + '\\ndk-build.cmd',
                    'NDK_LIBS_OUT=main/jniLibs',
                    'NDK_PROJECT_PATH=' + rootDir + '\\app\\src',
                    'APP_BUILD_SCRIPT=jni/Android.mk',
                    '-C',
                    file('src').absolutePath
        } else {
            commandLine ndkDir + '/ndk-build',
                    'NDK_LIBS_OUT=main/jniLibs',
                    'NDK_PROJECT_PATH=' + rootDir + '/app/src',
                    'APP_BUILD_SCRIPT=jni/Android.mk',
                    '-C',
                    file('src').absolutePath
        }
    }

    tasks.withType(JavaCompile) {
        compileTask -> compileTask.dependsOn ndkBuild
    }

}


dependencies {
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.github.clans:fab:1.6.4'
    implementation 'me.dm7.barcodescanner:zxing:1.8.4'
    //noinspection GradleCompatible
    implementation 'com.android.support:support-compat:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:support-v13:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.squareup.okhttp3:okhttp:3.8.0'
    implementation 'com.android.support:support-v4:27.1.1'
    androidTestImplementation 'junit:junit:4.12'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'org.web3j:core-android:2.2.1'
    implementation 'me.zhanghai.android.patternlock:library:2.1.2'
    implementation 'com.afollestad.material-dialogs:core:0.9.4.5'
    implementation 'io.github.kobakei:ratethisapp:1.2.0'
    implementation 'com.github.apl-devs:appintro:v4.1.0'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
    implementation 'me.grantland:autofittextview:0.2.1'
    implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0@aar'
    implementation('com.mikepenz:materialdrawer:5.9.1@aar') {
        transitive = true
    }
}