I have a problem with building Android with jenkins on ubuntu. The application build.gradle contains debug and release. When I try to build with gradlew assembleDebug or assembleRelease I get "task not foundTask 'assembleRelease' not found in root project 'My Application'" (instead clean and assemble work fine)
Same error if I try to manually gradlew assembleDebug on jenkis workspace folder, instead I can build on my laptop where I cloned the repo.
Build.gradle contains debug and release:
buildTypes {
debug{
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android- optimize.txt'), 'proguard-rules.pro'
}
}
This is the folder ls -latr:
drwxr-xr-x 4 jenkins jenkins 4096 Nov 6 22:31 ..
drwxr-xr-x 3 jenkins jenkins 4096 Nov 6 22:31 .idea
-rw-r--r-- 1 jenkins jenkins 222 Nov 6 22:31 .gitignore
- rw-r--r-- 1 jenkins jenkins 1184 Nov 6 22:31 gradle.properties
drwxr-xr-x 3 jenkins jenkins 4096 Nov 6 22:31 gradle
-rw-r--r-- 1 jenkins jenkins 689 Nov 6 22:31 build.gradle
-rw-r--r-- 1 jenkins jenkins 51 Nov 6 22:31 settings.gradle
-rw-r--r-- 1 jenkins jenkins 2260 Nov 6 22:31 gradlew.bat
drwxr-xr-x 3 jenkins jenkins 4096 Nov 6 22:31 wrapper
drwxr-xr-x 4 jenkins jenkins 4096 Nov 6 22:32 native
drwxr-xr-x 3 jenkins jenkins 4096 Nov 6 22:32 notifications
drwxr-xr-x 3 jenkins jenkins 4096 Nov 6 22:32 daemon
drwxr-xr-x 3 jenkins jenkins 4096 Nov 6 22:33 build-scan-data
drwx------ 7 jenkins jenkins 4096 Nov 6 22:33 caches
drwx------ 5 jenkins jenkins 4096 Nov 6 22:33 .gradle
-rwxr-xr-x 1 jenkins jenkins 5296 Nov 6 22:41 gradlew
drwxr-xr-x 13 jenkins jenkins 4096 Nov 6 22:41 .
drwxr-xr-x 8 jenkins jenkins 4096 Nov 6 22:41 .git
drwxr-xr-x 3 jenkins jenkins 4096 Nov 6 22:48 app
What can I do?