Open nayjanta opened 2 years ago
// wear/build.gradle should be edited like this
apply plugin: 'com.android.application'
repositories { maven { url 'https://maven.fabric.io/public' } maven { url "https://jitpack.io" } google() }
android {
Properties buildProps = getBuildProperties('local') compileSdkVersion 26 flavorDimensions "default" defaultConfig { minSdkVersion 23 targetSdkVersion 26 applicationId buildProps['APPLICATION_ID'] versionCode buildProps['VERSION_CODE'].toInteger() versionName buildProps['VERSION_NAME'].toString() } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { debuggable = true } }
}
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.support:wearable:2.1.0' implementation 'com.google.android.gms:play-services-wearable:11.8.0' implementation 'com.android.support:percent:26.1.0' implementation 'com.android.support:support-v4:26.1.0' implementation 'com.android.support:recyclerview-v7:26.1.0' implementation 'com.android.support:wear:26.1.0' compileOnly 'com.google.android.wearable:wearable:2.1.0' compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2' compile 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' compile 'com.android.support:appcompat-v7:26.1.0' compile 'com.google.zxing:core:3.3.0'
def getBuildProperties(buildType) { def propertiesFile = file(buildType + '.properties') if (propertiesFile.canRead()) { Properties versionProps = new Properties() versionProps.load(new FileInputStream(propertiesFile)) return versionProps } else { copy { from 'default.properties' into '.' rename { String fileName -> fileName.replace('default.properties', 'local.properties') } } getBuildProperties(build) } }
// wear/build.gradle should be edited like this
apply plugin: 'com.android.application'
repositories { maven { url 'https://maven.fabric.io/public' } maven { url "https://jitpack.io" } google() }
android {
}
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])
}
def getBuildProperties(buildType) { def propertiesFile = file(buildType + '.properties') if (propertiesFile.canRead()) { Properties versionProps = new Properties() versionProps.load(new FileInputStream(propertiesFile)) return versionProps } else { copy { from 'default.properties' into '.' rename { String fileName -> fileName.replace('default.properties', 'local.properties') } } getBuildProperties(build) } }