0

I'm implementing CI process with my project using Jenkins tool. Seems that there's compile issue when using kotlin, here's my console output for the build:

What went wrong:

A problem occurred evaluating project ':TestProject'.

Plugin with id 'kotlin-android' not found.

ANDROID_HOME is set where the jenkins runs.

EDIT 1:

the issue fixed when i added 'ext.kotlin_version = '1.2.21'' to the buildscript.

Now the build fails because of dependency declaration:

What went wrong:

A problem occurred evaluating project ':TestProject'.

Could not find method api() for arguments [com.android.support:appcompat-v7:27.0.2] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

I'm declaring my dependencies with api annotation, since it's a submodule:

api "com.android.support:appcompat-v7:$android_support_version"

Jenkins won't recognise the api method

Community
  • 1
  • 1
Juvi
  • 1,078
  • 1
  • 19
  • 38
  • 1
    Sounds like you've forgot to add `kotlin-gradle-plugin` to your dependencies in the project `build.gradle` file (i.e. one level above the `app` directory). – Michael Feb 05 '18 at 09:42
  • refer https://stackoverflow.com/questions/46101908/error1-0-plugin-with-id-kotlin-android-extensions-not-found – sasikumar Feb 05 '18 at 10:06
  • @Michael you are right, since it's a submodule i thought it would be redundant but it was necessary – Juvi Feb 05 '18 at 14:08

0 Answers0