Not able to generate apk file at gradlew step - Java + Kotlin project

Our team uses both java and kotlin in our android code base. When I am trying to generate a binary file I am getting below error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ‘:appinjector:kaptDevReleaseKotlin’.
> Could not resolve all files for configuration ‘:appinjector:kotlinCompilerClasspath’.
_ > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.2.71._
_ Required by:_
_ project :appinjector_
_ > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.2.71._
_ > Could not get resource ‘http://artifactory.mfsbe.com/artifactory/libs-snapshot-local/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.2.71/kotlin-compiler-embeddable-1.2.71.pom’._
_ > Could not HEAD ‘http://artifactory.mfsbe.com/artifactory/libs-snapshot-local/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.2.71/kotlin-compiler-embeddable-1.2.71.pom’._
_ > Connect to artifactory.mfsbe.com:80 [artifactory.mfsbe.com/10.211.1.241] failed: connect timed out_

I tried below, but didn’t work:

  1. Installed Kotlin from shell step and set it as an env variable.
    My potential guess of what could work:
  2. Make Android studio install require kotlin plugin. Not sure how to do this.

I welcome your suggestions on any alternative approach to.

You will have better luck on an Android development forum. I don’t think many people on this forum build the apps they are testing. Try some of these:

https://www.quora.com/Is-there-a-discussion-forum-for-Android-app-development