From e43b64207609f47fdb588f82cd16bd2e8875df32 Mon Sep 17 00:00:00 2001 From: Kevin Gorham Date: Tue, 9 Oct 2018 21:18:23 -0400 Subject: [PATCH] migrate to gradle's Kotlin DSL --- zcash-android-wallet-app/app/build.gradle | 41 ------------------ zcash-android-wallet-app/app/build.gradle.kts | 42 +++++++++++++++++++ zcash-android-wallet-app/build.gradle | 28 ------------- zcash-android-wallet-app/build.gradle.kts | 25 +++++++++++ zcash-android-wallet-app/settings.gradle | 1 - zcash-android-wallet-app/settings.gradle.kts | 5 +++ zcash-android-wallet-sdk-poc/build.gradle | 40 ------------------ zcash-android-wallet-sdk-poc/build.gradle.kts | 40 ++++++++++++++++++ 8 files changed, 112 insertions(+), 110 deletions(-) delete mode 100644 zcash-android-wallet-app/app/build.gradle create mode 100644 zcash-android-wallet-app/app/build.gradle.kts delete mode 100644 zcash-android-wallet-app/build.gradle create mode 100644 zcash-android-wallet-app/build.gradle.kts delete mode 100644 zcash-android-wallet-app/settings.gradle create mode 100644 zcash-android-wallet-app/settings.gradle.kts delete mode 100644 zcash-android-wallet-sdk-poc/build.gradle create mode 100644 zcash-android-wallet-sdk-poc/build.gradle.kts diff --git a/zcash-android-wallet-app/app/build.gradle b/zcash-android-wallet-app/app/build.gradle deleted file mode 100644 index 366c031..0000000 --- a/zcash-android-wallet-app/app/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -apply plugin: 'com.android.application' - -apply plugin: 'kotlin-android' - -apply plugin: 'kotlin-android-extensions' - -android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" - defaultConfig { - applicationId "cash.z.wallet.app" - minSdkVersion 21 - targetSdkVersion 28 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - implementation project(":sdk") - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.0.0-beta01' - implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha06' - implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha06' - implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha06' - implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha06' - implementation 'androidx.core:core-ktx:1.0.0' - implementation 'com.google.android.material:material:1.0.0-beta01' - implementation 'androidx.constraintlayout:constraintlayout:1.1.2' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.0-alpha4' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4' -} diff --git a/zcash-android-wallet-app/app/build.gradle.kts b/zcash-android-wallet-app/app/build.gradle.kts new file mode 100644 index 0000000..1a8393a --- /dev/null +++ b/zcash-android-wallet-app/app/build.gradle.kts @@ -0,0 +1,42 @@ +import org.jetbrains.kotlin.config.KotlinCompilerVersion + +plugins { + id("com.android.application") + id("kotlin-android-extensions") + id("kotlin-android") +} + +android { + compileSdkVersion(28) + defaultConfig { + minSdkVersion(21) + targetSdkVersion(28) + applicationId = "cash.z.wallet.app" + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } +} + +dependencies { + implementation(project(":sdk")) + implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71") + implementation("androidx.appcompat:appcompat:1.0.0-beta01") + implementation("android.arch.navigation:navigation-fragment:1.0.0-alpha06") + implementation("android.arch.navigation:navigation-ui:1.0.0-alpha06") + implementation("android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha06") + implementation("android.arch.navigation:navigation-ui-ktx:1.0.0-alpha06") + implementation("androidx.core:core-ktx:1.0.0") + implementation("com.google.android.material:material:1.0.0-beta01") + implementation("androidx.constraintlayout:constraintlayout:1.1.2") + testImplementation("junit:junit:4.12") + androidTestImplementation("androidx.test:runner:1.1.0-alpha4") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.0-alpha4") +} diff --git a/zcash-android-wallet-app/build.gradle b/zcash-android-wallet-app/build.gradle deleted file mode 100644 index 0527a64..0000000 --- a/zcash-android-wallet-app/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - ext.kotlin_version = '1.2.71' - repositories { - google() - jcenter() - - } - dependencies { - classpath 'com.android.tools.build:gradle:3.3.0-alpha12' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - jcenter() - - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/zcash-android-wallet-app/build.gradle.kts b/zcash-android-wallet-app/build.gradle.kts new file mode 100644 index 0000000..97cd643 --- /dev/null +++ b/zcash-android-wallet-app/build.gradle.kts @@ -0,0 +1,25 @@ +buildscript { +// ext.kotlin_version = '1.2.71' +// val kotlinVersion by extra { "1.2.71" } + repositories { + google() + jcenter() + + } + dependencies { + classpath("com.android.tools.build:gradle:3.3.0-alpha13") + classpath(kotlin("gradle-plugin", version = "1.2.71")) + } +} + +allprojects { + repositories { + google() + jcenter() + + } +} + +tasks.register("clean", Delete::class) { + delete(rootProject.buildDir) +} diff --git a/zcash-android-wallet-app/settings.gradle b/zcash-android-wallet-app/settings.gradle deleted file mode 100644 index 228642e..0000000 --- a/zcash-android-wallet-app/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app', ':sdk' diff --git a/zcash-android-wallet-app/settings.gradle.kts b/zcash-android-wallet-app/settings.gradle.kts new file mode 100644 index 0000000..920e9fc --- /dev/null +++ b/zcash-android-wallet-app/settings.gradle.kts @@ -0,0 +1,5 @@ +//Explicitly set `rootProject.buildFileName` +// avoids project import issues caused by Android Studio silently adding a `build.gradle` file +rootProject.buildFileName = "build.gradle.kts" + +include(":app", ":sdk") diff --git a/zcash-android-wallet-sdk-poc/build.gradle b/zcash-android-wallet-sdk-poc/build.gradle deleted file mode 100644 index 026dc5f..0000000 --- a/zcash-android-wallet-sdk-poc/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" - - - defaultConfig { - minSdkVersion 16 - targetSdkVersion 28 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - - implementation 'com.android.support:appcompat-v7:28.0.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} -repositories { - mavenCentral() -} diff --git a/zcash-android-wallet-sdk-poc/build.gradle.kts b/zcash-android-wallet-sdk-poc/build.gradle.kts new file mode 100644 index 0000000..98eba25 --- /dev/null +++ b/zcash-android-wallet-sdk-poc/build.gradle.kts @@ -0,0 +1,40 @@ +import org.jetbrains.kotlin.config.KotlinCompilerVersion + +plugins { + id("com.android.library") + id("kotlin-android-extensions") + id("kotlin-android") +} + +android { + compileSdkVersion(28) + + defaultConfig { + minSdkVersion(16) + targetSdkVersion(28) + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner" + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + +} + +dependencies { + compile("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71") + implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) + implementation("com.android.support:appcompat-v7:28.0.0") + testImplementation("junit:junit:4.12") + androidTestImplementation("com.android.support.test:runner:1.0.2") + androidTestImplementation("com.android.support.test.espresso:espresso-core:3.0.2") +} + +repositories { + mavenCentral() +}