Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Gradle and AGP #405

Merged
merged 2 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.novoda:bintray-release:0.9.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:4.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
31 changes: 1 addition & 30 deletions config/android-quality.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,4 @@ task checkstyle(type: Checkstyle) {
classpath = files()
}

check.dependsOn 'checkstyle', 'lint'

apply plugin: 'jacoco'

task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') {
group = 'reporting'
description = 'Generate Jacoco coverage reports after running tests.'
reports {
xml.enabled = true
html.enabled = true
}

def fileFilter = ['**/R.class',
'**/R$*.class',
'**/*$ViewInjector*.*',
'**/BuildConfig.*',
'**/Manifest*.*',
'**/*Test*.*',
'**/*$InjectAdapter.class',
'**/*$ModuleAdapter.class',
'**/*$$*',
'android/**/*.*']
def debugTree = fileTree(dir: "${buildDir}/intermediates/classes/debug", excludes: fileFilter)
def mainSrc = "${project.projectDir}/src/main/java"

sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = files(["${buildDir}/jacoco/testDebugUnitTest.exec",
"${buildDir}/outputs/code-coverage/connected/coverage.ec"])
}
check.dependsOn 'checkstyle', 'lint'
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 0 additions & 18 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.novoda.bintray-release'
apply from: '../config/android-quality.gradle'

android {
Expand Down Expand Up @@ -32,25 +31,8 @@ dependencies {

implementation 'com.google.android.material:material:1.2.0'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

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'
}

publish {
userOrg = 'schibstedspain'
groupId = 'com.schibsted.spain'
artifactId = 'barista'
publishVersion = baristaVersion
desc = 'The guy who serves a great Espresso'
website = 'https://github.com/SchibstedSpain/Barista'
}

// Exclude Kotlin files from Javadoc due to an error generating docs from Kotlin files.
// More info: https://github.com/novoda/bintray-release/issues/71
tasks.withType(Javadoc) {
excludes = ['**/*.kt']
}
1 change: 0 additions & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
Expand Down