diff --git a/build.gradle b/build.gradle deleted file mode 100644 index f5b3b8a8f..000000000 --- a/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} - -ext.minSdkVersionDeclared = 19 -ext.compileSdkVersionDeclared = 30 - -ext.supportLibVersion = '27.1.1' -ext.espressoVersion = '3.0.2' -ext.uiAutomatorVersion = '2.1.3' -ext.baristaVersion = '3.10.0' diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..7bb12ec21 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,21 @@ +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath("com.android.tools.build:gradle:4.2.1") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +task("clean") { + setDelete(rootProject.buildDir) +} \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle deleted file mode 100644 index a4f499e27..000000000 --- a/library/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply from: '../config/android-quality.gradle' - -android { - compileSdkVersion compileSdkVersionDeclared - - defaultConfig { - minSdkVersion minSdkVersionDeclared - targetSdkVersion compileSdkVersionDeclared - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - lintOptions { - disable 'InvalidPackage' - } - kotlinOptions.freeCompilerArgs += ["-module-name", "barista"] -} - -dependencies { - api 'androidx.test.espresso:espresso-core:3.1.1' - api 'androidx.test.espresso:espresso-contrib:3.1.1' - api 'androidx.test.uiautomator:uiautomator:2.2.0' - api 'androidx.test.espresso:espresso-intents:3.1.1' - - implementation 'androidx.annotation:annotation:1.0.2' - implementation 'androidx.legacy:legacy-support-core-ui:1.0.0' - implementation 'androidx.vectordrawable:vectordrawable-animated:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.0.0' - api 'androidx.viewpager2:viewpager2:1.0.0' - - implementation 'com.google.android.material:material:1.2.0' - - testImplementation 'junit:junit:4.12' - testImplementation 'pl.pragmatists:JUnitParams:1.1.0' - testImplementation 'org.assertj:assertj-core:1.7.0' - testImplementation 'org.mockito:mockito-core:2.28.2' -} diff --git a/library/build.gradle.kts b/library/build.gradle.kts new file mode 100644 index 000000000..b6f498165 --- /dev/null +++ b/library/build.gradle.kts @@ -0,0 +1,40 @@ +plugins { + id("com.android.library") + kotlin("android") +} + +apply(from= "../config/android-quality.gradle") + +android { + compileSdk = 30 + + defaultConfig { + minSdk = 19 + targetSdk = 30 + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + lintOptions { + disable.add("InvalidPackage") + } +} + +dependencies { + api("androidx.test.espresso:espresso-core:3.1.1") + api("androidx.test.espresso:espresso-contrib:3.1.1") + api("androidx.test.uiautomator:uiautomator:2.2.0") + api("androidx.test.espresso:espresso-intents:3.1.1") + + implementation("androidx.annotation:annotation:1.0.2") + implementation("androidx.legacy:legacy-support-core-ui:1.0.0") + implementation("androidx.vectordrawable:vectordrawable-animated:1.0.0") + implementation("androidx.recyclerview:recyclerview:1.0.0") + api("androidx.viewpager2:viewpager2:1.0.0") + + implementation("com.google.android.material:material:1.2.0") + + testImplementation("junit:junit:4.12") + testImplementation("pl.pragmatists:JUnitParams:1.1.0") + testImplementation("org.assertj:assertj-core:1.7.0") + testImplementation("org.mockito:mockito-core:2.28.2") +} diff --git a/library/proguard-rules.pro b/library/proguard-rules.pro deleted file mode 100644 index 5fcc082a5..000000000 --- a/library/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/roc/.android-sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/sample/build.gradle b/sample/build.gradle deleted file mode 100644 index 2adb1e9d7..000000000 --- a/sample/build.gradle +++ /dev/null @@ -1,52 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply from: '../config/android-quality.gradle' - -android { - compileSdkVersion compileSdkVersionDeclared - defaultConfig { - applicationId "com.schibsted.spain.barista.sample" - minSdkVersion minSdkVersionDeclared - targetSdkVersion compileSdkVersionDeclared - versionCode 1 - versionName "1.0" - vectorDrawables.useSupportLibrary = true - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArguments clearPackageData: 'true' - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - testOptions { - execution 'ANDROIDX_TEST_ORCHESTRATOR' - } -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.0.2' - implementation 'androidx.recyclerview:recyclerview:1.0.0' - implementation 'com.google.android.material:material:1.2.0' - implementation 'androidx.annotation:annotation:1.0.2' - implementation 'com.github.bumptech.glide:glide:4.10.0' - implementation 'com.google.android.material:material:1.2.0' - implementation 'androidx.core:core-ktx:1.0.1' - - androidTestUtil 'androidx.test:orchestrator:1.3.0' - androidTestImplementation project(':library') - androidTestImplementation "org.assertj:assertj-core:2.9.1" - androidTestImplementation "com.nhaarman:mockito-kotlin:1.5.0" - androidTestImplementation "org.mockito:mockito-android:2.28.2" - - testImplementation 'junit:junit:4.12' - -} \ No newline at end of file diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts new file mode 100644 index 000000000..93cf502d6 --- /dev/null +++ b/sample/build.gradle.kts @@ -0,0 +1,50 @@ +plugins { + id("com.android.application") + id("kotlin-android-extensions") + kotlin("android") +} + +apply(from = "../config/android-quality.gradle") + +android { + compileSdk = 30 + + defaultConfig { + minSdk = 19 + targetSdk = 30 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + testInstrumentationRunnerArguments["clearPackageData"] = "true" + + vectorDrawables.useSupportLibrary = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + testOptions { + execution = "ANDROIDX_TEST_ORCHESTRATOR" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.0.2") + implementation("androidx.recyclerview:recyclerview:1.0.0") + implementation("com.google.android.material:material:1.2.0") + implementation("androidx.annotation:annotation:1.0.2") + implementation("com.github.bumptech.glide:glide:4.10.0") + implementation("com.google.android.material:material:1.2.0") + implementation("androidx.core:core-ktx:1.0.1") + + androidTestUtil("androidx.test:orchestrator:1.3.0") + androidTestImplementation(project(":library")) + androidTestImplementation("org.assertj:assertj-core:2.9.1") + androidTestImplementation("com.nhaarman:mockito-kotlin:1.5.0") + androidTestImplementation("org.mockito:mockito-android:2.28.2") + + testImplementation("junit:junit:4.12") + +} \ No newline at end of file diff --git a/sample/proguard-rules.pro b/sample/proguard-rules.pro deleted file mode 100644 index 5fcc082a5..000000000 --- a/sample/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/roc/.android-sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#}