gradle fix
This commit is contained in:
parent
7392eaeb58
commit
8345d48250
2 changed files with 367 additions and 2 deletions
|
@ -1 +0,0 @@
|
|||
/home/andy/Dropbox/workspaces/aaps/andy_AndroidAPS_Medtronic_Shared/app/build.gradle
|
265
app/build.gradle
Normal file
265
app/build.gradle
Normal file
|
@ -0,0 +1,265 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'io.fabric.tools:gradle:1.+'
|
||||
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.3'
|
||||
}
|
||||
}
|
||||
apply plugin: "com.android.application"
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: "io.fabric"
|
||||
apply plugin: "jacoco-android"
|
||||
apply plugin: 'com.jakewharton.butterknife'
|
||||
|
||||
ext {
|
||||
supportLibraryVersion = "27.1.1"
|
||||
ormLiteVersion = "4.46"
|
||||
powermockVersion = "1.7.3"
|
||||
dexmakerVersion = "1.2"
|
||||
butterknifeVersion = "8.8.1"
|
||||
}
|
||||
|
||||
|
||||
repositories {
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
jcenter { url "https://jcenter.bintray.com/" }
|
||||
}
|
||||
|
||||
def generateGitBuild = { ->
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
try {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'describe', '--always'
|
||||
standardOutput = stdout
|
||||
}
|
||||
String commitObject = stdout.toString().trim()
|
||||
stringBuilder.append(commitObject)
|
||||
} catch (ignored) {
|
||||
stringBuilder.append('NoGitSystemAvailable')
|
||||
}
|
||||
return stringBuilder.toString()
|
||||
}
|
||||
|
||||
def generateDate = { ->
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append((new Date()).format('yyyy.MM.dd-HH:mm'))
|
||||
return stringBuilder.toString()
|
||||
}
|
||||
|
||||
tasks.matching { it instanceof Test }.all {
|
||||
testLogging.events = ["failed", "skipped", "started"]
|
||||
testLogging.exceptionFormat = "full"
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
multiDexEnabled true
|
||||
versionCode 1500
|
||||
// dev_version: 2.2.3-dev
|
||||
version "medtronic-0.9.2-SNAPSHOT"
|
||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
|
||||
buildConfigField "String", "DEV_VERSION", '"2.2.3-dev"'
|
||||
buildConfigField "String", "DEV_DATE", '"7.4.2019"'
|
||||
buildConfigField "String", "DEV_CHECKIN", '"a076b00363067fd43c83cbbd91cc964fa6978ddd"'
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
// if you change minSdkVersion to less than 11, you need to change executeTask for wear
|
||||
|
||||
ndk {
|
||||
moduleName "BleCommandUtil"
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
// TODO remove once wear dependency com.google.android.gms:play-services-wearable:7.3.0
|
||||
// has been upgraded (requiring significant code changes), which currently fails release
|
||||
// build with a deprecation warning
|
||||
// abortOnError false
|
||||
// (disabled entirely to avoid reports on the error, which would still be displayed
|
||||
// and it's easy to overlook that it's ignored)
|
||||
checkReleaseBuilds false
|
||||
disable 'MissingTranslation'
|
||||
disable 'ExtraTranslation'
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
testCoverageEnabled(project.hasProperty('coverage'))
|
||||
}
|
||||
}
|
||||
productFlavors {
|
||||
flavorDimensions "standard"
|
||||
full {
|
||||
applicationId "info.nightscout.androidaps"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "AndroidAPS"
|
||||
versionName version
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/ic_launcher",
|
||||
appIconRound: "@mipmap/ic_launcher_round"
|
||||
]
|
||||
}
|
||||
pumpcontrol {
|
||||
applicationId "info.nightscout.aapspumpcontrol"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "Pumpcontrol"
|
||||
versionName version + "-pumpcontrol"
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/ic_pumpcontrol",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
nsclient {
|
||||
applicationId "info.nightscout.nsclient"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "NSClient"
|
||||
versionName version + "-nsclient"
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/ic_yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
nsclient2 {
|
||||
applicationId "info.nightscout.nsclient2"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "NSClient2"
|
||||
versionName version + "-nsclient"
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/ic_yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests.returnDefaultValues = true
|
||||
unitTests.includeAndroidResources = true
|
||||
}
|
||||
|
||||
useLibrary "org.apache.http.legacy"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
libs
|
||||
}
|
||||
|
||||
dependencies {
|
||||
wearApp project(':wear')
|
||||
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
|
||||
implementation 'com.google.firebase:firebase-core:16.0.8'
|
||||
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") {
|
||||
transitive = true;
|
||||
}
|
||||
libs "MilosKozak:danars-support-lib:master@zip"
|
||||
|
||||
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:support-v13:${supportLibraryVersion}"
|
||||
implementation "com.android.support:support-v4:${supportLibraryVersion}"
|
||||
implementation "com.android.support:cardview-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:recyclerview-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:gridlayout-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:design:${supportLibraryVersion}"
|
||||
implementation "com.android.support:percent:${supportLibraryVersion}"
|
||||
implementation "com.wdullaer:materialdatetimepicker:2.3.0"
|
||||
implementation "com.squareup:otto:1.3.7"
|
||||
implementation "com.j256.ormlite:ormlite-core:${ormLiteVersion}"
|
||||
implementation "com.j256.ormlite:ormlite-android:${ormLiteVersion}"
|
||||
implementation("com.github.tony19:logback-android-classic:1.1.1-6") {
|
||||
exclude group: "com.google.android", module: "android"
|
||||
}
|
||||
implementation "org.apache.commons:commons-lang3:3.7"
|
||||
implementation "org.slf4j:slf4j-api:1.7.21"
|
||||
// Graphview cannot be upgraded
|
||||
implementation "com.jjoe64:graphview:4.0.1"
|
||||
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.1.1"
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation(name: "android-edittext-validator-v1.3.4-mod", ext: "aar")
|
||||
implementation 'com.madgag.spongycastle:core:1.58.0.0'
|
||||
|
||||
implementation("com.google.android:flexbox:0.3.0") {
|
||||
exclude group: "com.android.support"
|
||||
}
|
||||
implementation("io.socket:socket.io-client:1.0.0") {
|
||||
// excluding org.json which is provided by Android
|
||||
exclude group: "org.json", module: "json"
|
||||
}
|
||||
implementation "com.google.code.gson:gson:2.8.2"
|
||||
implementation "com.google.guava:guava:24.1-jre"
|
||||
|
||||
implementation "net.danlew:android.joda:2.9.9.1"
|
||||
implementation "uk.com.robust-it:cloning:1.9.9"
|
||||
|
||||
implementation 'org.mozilla:rhino:1.7.7.2'
|
||||
|
||||
implementation "com.jakewharton:butterknife:${butterknifeVersion}"
|
||||
annotationProcessor "com.jakewharton:butterknife-compiler:${butterknifeVersion}"
|
||||
|
||||
testImplementation "junit:junit:4.12"
|
||||
testImplementation "org.json:json:20140107"
|
||||
testImplementation "org.mockito:mockito-core:2.8.47"
|
||||
testImplementation "org.powermock:powermock-api-mockito2:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4-rule-agent:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4-rule:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4:${powermockVersion}"
|
||||
testImplementation "joda-time:joda-time:2.9.9"
|
||||
testImplementation "com.google.truth:truth:0.39"
|
||||
testImplementation 'org.robolectric:robolectric:3.8'
|
||||
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
||||
testImplementation "org.hamcrest:hamcrest-all:1.3"
|
||||
testImplementation "uk.org.lidalia:slf4j-test:1.2.0"
|
||||
|
||||
androidTestImplementation "org.mockito:mockito-core:2.8.47"
|
||||
androidTestImplementation "com.google.dexmaker:dexmaker:${dexmakerVersion}"
|
||||
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
|
||||
}
|
||||
|
||||
task unzip(type: Copy) {
|
||||
def zipPath = configurations.libs.find { it.name.startsWith("danars") }
|
||||
def zipFile = file(zipPath)
|
||||
def outputDir = file("${buildDir}/unpacked/dist")
|
||||
|
||||
from zipTree(zipFile)
|
||||
into outputDir
|
||||
}
|
||||
|
||||
task copyLibs(dependsOn: unzip, type: Copy) {
|
||||
def src = file("${buildDir}/unpacked/dist/danars-support-lib-master")
|
||||
def target = file("src/main/jniLibs/")
|
||||
|
||||
from src
|
||||
into target
|
||||
}
|
||||
|
||||
task full_clean(type: Delete) {
|
||||
delete file("src/main/jniLibs")
|
||||
}
|
||||
|
||||
clean.dependsOn full_clean
|
||||
preBuild.dependsOn copyLibs
|
|
@ -1 +0,0 @@
|
|||
/home/andy/Dropbox/workspaces/aaps/andy_AndroidAPS_Medtronic_Shared/wear/build.gradle
|
102
wear/build.gradle
Normal file
102
wear/build.gradle
Normal file
|
@ -0,0 +1,102 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
ext {
|
||||
wearableVersion = "2.0.1"
|
||||
playServicesWearable = "16.0.1"
|
||||
}
|
||||
|
||||
def generateGitBuild = { ->
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append('"')
|
||||
try {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'describe', '--always'
|
||||
standardOutput = stdout
|
||||
}
|
||||
String commitObject = stdout.toString().trim()
|
||||
stringBuilder.append(commitObject)
|
||||
} catch (ignored) {
|
||||
stringBuilder.append('NoGitSystemAvailable')
|
||||
}
|
||||
stringBuilder.append('-')
|
||||
stringBuilder.append((new Date()).format('yyyy.MM.dd'))
|
||||
stringBuilder.append('"')
|
||||
return stringBuilder.toString()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
|
||||
defaultConfig {
|
||||
applicationId "info.nightscout.androidaps"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 23
|
||||
versionCode 1
|
||||
versionName "1.0.2"
|
||||
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
flavorDimensions "standard"
|
||||
full {
|
||||
applicationId "info.nightscout.androidaps"
|
||||
dimension "standard"
|
||||
versionName version
|
||||
}
|
||||
pumpcontrol {
|
||||
applicationId "info.nightscout.aapspumpcontrol"
|
||||
dimension "standard"
|
||||
versionName version + "-pumpcontrol"
|
||||
}
|
||||
nsclient {
|
||||
applicationId "info.nightscout.nsclient"
|
||||
dimension "standard"
|
||||
versionName version + "-nsclient"
|
||||
}
|
||||
nsclient2 {
|
||||
applicationId "info.nightscout.nsclient2"
|
||||
dimension "standard"
|
||||
versionName version + "-nsclient"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation files("libs/hellocharts-library-1.5.5.jar")
|
||||
//compile "com.ustwo.android:clockwise-wearable:1.0.2"
|
||||
compileOnly "com.google.android.wearable:wearable:${wearableVersion}"
|
||||
implementation "com.google.android.support:wearable:${wearableVersion}"
|
||||
implementation "com.google.android.gms:play-services-wearable:${playServicesWearable}"
|
||||
implementation(name: "ustwo-clockwise-debug", ext: "aar")
|
||||
implementation "com.android.support:support-v4:27.0.1"
|
||||
implementation 'com.android.support:wear:27.0.1'
|
||||
implementation "me.denley.wearpreferenceactivity:wearpreferenceactivity:0.5.0"
|
||||
}
|
Loading…
Reference in a new issue