I am new to gradle. My android app is supposed to be built command-line build with gradle on an osx machine. After resolving many issues with proxy & connectivity, I am finally getting an error when my script tries to build:
A problem occurred evaluating root project 'android-build'.
> Failed to apply plugin [id 'com.mycompany.myappid']
> Plugin with id 'com.mycompany.myappid' not found.
How can I fix this issue ? Appreciate any suggestions pls
My build.gradle looks like below:
buildscript {
repositories {
maven {
url "http://repo1.maven.org/maven2"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
apply plugin: 'com.mycompany.myappid'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
def versionPropsFile = file('version.properties')
if (versionPropsFile.canRead()) {
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
def code = versionProps['VERSION_CODE'].toInteger() + 1
versionProps['VERSION_CODE']=code.toString()
versionProps.store(versionPropsFile.newWriter(), null)
defaultConfig {
versionCode code
versionName "1.1"
minSdkVersion 14
targetSdkVersion 18
}
}
else {
throw new GradleException("Could not read version.properties!")
}
}