Skip to content

Commit

Permalink
Removed robolectric and electricspock dependency (#770)
Browse files Browse the repository at this point in the history
* Updated gradle and gradle wrapper

* Changed Java version to Java 11

* Updated compile and target SDK versions

* Switched to maven-publish plugin

* Updated java version in github actions

* Replaced jcenter with mavenCentral

* Updated kotlin version

* Updated gradle

* Updated recyclerview

* Removed robolectric and electricspock dependency

* Fixed sample tests

* Upgrade java version to fix error

* Remove afterEvaluate

Seems to work without now, and errors with

* Added stub class usage info

* Updated Kotlin version

* Updated gradle version

* Gradle update

* Gradle update

* Fix javadocs

* Fix javadocs

* Fixes for java docs

* Update dagger version

* Dependency updates

* Fix classpath
  • Loading branch information
nrbrook committed May 21, 2022
1 parent da9dcf1 commit d203b41
Show file tree
Hide file tree
Showing 62 changed files with 4,811 additions and 322 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: "Checkout Repository"
uses: actions/checkout@v2
- name: "Set up Android JDK environment"
uses: actions/setup-java@v2.1.0
uses: actions/setup-java@v2.2.0
with:
distribution: 'adopt'
java-version: '8'
java-version: '11'
java-package: jdk
- name: "Run Checkstyle"
run: ./gradlew checkstyle
Expand Down
31 changes: 26 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ apply from: 'dependencies.gradle'
apply from: 'checkstyle.gradle'

buildscript {
ext.kotlinVersion = '1.5.21'
ext.kotlinVersion = '1.6.10'
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
classpath 'gradle.plugin.org.codehaus.groovy:groovy-android-gradle-plugin:3.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
Expand All @@ -24,17 +24,27 @@ allprojects {

repositories {
google()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
maven { url 'https://jitpack.io' }
mavenCentral()
}

buildscript {
repositories {
google()
jcenter()
}
}

configurations {
doclava
}

dependencies {
doclava 'com.google.doclava:doclava:1.0.6'
}

dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
Expand All @@ -52,7 +62,18 @@ allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}

tasks.withType(Test) {
useJUnitPlatform()
testLogging {
exceptionFormat "full"
events "started", "skipped", "passed", "failed"
showStandardStreams true
}
}
}


}

task clean(type: Delete) {
Expand Down
11 changes: 9 additions & 2 deletions dagger-compiler-shadow/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:$rootProject.ext.shadowPluginVersion"
classpath "gradle.plugin.com.github.johnrengelman:shadow:$rootProject.ext.shadowPluginVersion"
}
}

Expand All @@ -23,3 +25,8 @@ shadowJar {
dependencies {
implementation rootProject.ext.libs.dagger_compiler
}

java {
sourceCompatibility = rootProject.ext.sourceCompatibilityVersion
targetCompatibility = rootProject.ext.targetCompatibilityVersion
}
11 changes: 9 additions & 2 deletions dagger-library-shadow/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:$rootProject.ext.shadowPluginVersion"
classpath "gradle.plugin.com.github.johnrengelman:shadow:$rootProject.ext.shadowPluginVersion"
}
}

Expand All @@ -28,3 +30,8 @@ artifacts {
dependencies {
implementation rootProject.ext.libs.dagger
}

java {
sourceCompatibility = rootProject.ext.sourceCompatibilityVersion
targetCompatibility = rootProject.ext.targetCompatibilityVersion
}
18 changes: 7 additions & 11 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
ext {
rxJavaVersion = '2.2.17'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
shadowPluginVersion = '5.0.0'
daggerVersion = '2.15'
sourceCompatibilityVersion = JavaVersion.VERSION_1_8
targetCompatibilityVersion = JavaVersion.VERSION_1_8
shadowPluginVersion = '7.1.2'
daggerVersion = '2.41'
libs = [
/* Library-only dependencies */
rxjava : "io.reactivex.rxjava2:rxjava:$rxJavaVersion",
rxandroid : 'io.reactivex.rxjava2:rxandroid:2.1.1',
rxrelay : 'com.jakewharton.rxrelay2:rxrelay:2.1.1',
junit : 'junit:junit:4.13',
groovy : 'org.codehaus.groovy:groovy:2.5.8',
spock : ['org.spockframework:spock-core:1.2-groovy-2.5',
'cglib:cglib-nodep:3.3.0',
'org.objenesis:objenesis:2.6'],
electricspock : 'com.github.hkhc:electricspock:0.9',
junit : 'org.junit.jupiter:junit-jupiter:5.8.1',
groovy : ['org.codehaus.groovy:groovy:3.0.9', 'org.codehaus.groovy:groovy-test:3.0.9'],
spock : 'org.spockframework:spock-core:2.0-groovy-3.0',
dagger : "com.google.dagger:dagger:$daggerVersion",
dagger_compiler : "com.google.dagger:dagger-compiler:$daggerVersion",
/* Shared library-sample apps dependencies */
annotations : "androidx.annotation:annotation:1.1.0",
robolectric : 'org.robolectric:robolectric:3.8',
/* Sample apps-only dependencies */
rxjava_replayingshare : 'com.jakewharton.rx2:replaying-share:2.2.0',
rxjava_binding : 'com.jakewharton.rxbinding3:rxbinding:3.1.0',
Expand Down
Loading

0 comments on commit d203b41

Please sign in to comment.