Skip to content

Commit

Permalink
Merge pull request #39 from ikesyo/support-android-gradle-plugin-3.6.x
Browse files Browse the repository at this point in the history
Support Android Gradle plugin 3.6.x
  • Loading branch information
piotrmadry committed Mar 23, 2020
2 parents b92b14f + 4772314 commit 1583df4
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.gradle.kotlin:plugins:1.2.2"
classpath "org.gradle.kotlin:plugins:1.3.3"
classpath "com.gradle.publish:plugin-publish-plugin:0.10.0"
}
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Feb 11 20:37:25 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
2 changes: 1 addition & 1 deletion plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ configurations.all {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "com.android.tools.build:gradle:3.4.0"
implementation "com.android.tools.build:gradle:3.6.1"
testCompile "junit:junit-dep:4.11"
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ class FirebaseTestLabPlugin : Plugin<Project> {
isIgnoreExitValue = true

doLast {
if (execResult.exitValue != 0) {
println(standardOutput.toString())
throw GradleException("exec failed; see output above")
execResult?.let {
if (it.exitValue != 0) {
println(standardOutput.toString())
throw GradleException("exec failed; see output above")
}
}
}
}
Expand Down Expand Up @@ -197,8 +199,8 @@ class FirebaseTestLabPlugin : Plugin<Project> {
CloudTestResultDownloader(
sdk,
resultsTypes,
File(cloudDirectoryName),
File(project.buildDir, cloudDirectoryName),
File(cloudDirectoryName!!),
File(project.buildDir, cloudDirectoryName!!),
cloudBucketName!!,
project.logger
)
Expand Down Expand Up @@ -526,13 +528,12 @@ private fun resolveApk(variant: ApkVariant, baseVariantOutput: BaseVariantOutput
try {
val applicationProvider = variant.packageApplicationProvider.get()
applicationProvider.let {
var filename: String
if (baseVariantOutput is ApkVariantOutput) {
filename = baseVariantOutput.outputFileName
val filename = if (baseVariantOutput is ApkVariantOutput) {
baseVariantOutput.outputFileName
} else {
filename = it.apkNames.toList()[0]
it.apkNames.toList()[0]
}
File(it.outputDirectory, filename)
File(it.outputDirectory.get().asFile, filename)
}
} catch (e: Exception) {
when (e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.appunite.firebasetestlabplugin

import com.android.build.gradle.LibraryExtension
import junit.framework.Assert.assertTrue
import org.gradle.api.Project
import org.gradle.api.internal.project.ProjectInternal
import org.gradle.kotlin.dsl.configure
import org.gradle.testfixtures.ProjectBuilder
import org.junit.Assert.assertTrue
import org.junit.Test
import java.io.File

Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'firebase.test.lab:plugin:2.5.0'
}
Expand Down

0 comments on commit 1583df4

Please sign in to comment.