Closed marek-kuticka closed 8 years ago
can you recommend a setup, that works?
I'd recommend checking out the sample https://github.com/groovy/groovy-android-gradle-plugin/blob/master/groovy-android-sample-app/sample-app.gradle
As for the error message you are recieving, it looks like the plugin version is getting screwed up. Could you try the latest snapshot version and see if the error goes away?
Hi. thx for answer. fun part is... I have also downloaded whole this "project" and imported it as gradle project. here the sample project works well. if I just copy files of sample project to different location, where nor directories on same level as sample app ( siblings ), are not there, neither its parent directory, then the build fails. I have tried to modify my .gradle file according to this sample but I did not succeed.
as for 0.3.8-SNAPSHOT I am somehow not able to download it, it is not found by Android Studio. ( I have tried also most various versions of all parts, still without success )
thx a lot
Marek
ok, managed to build the plugin to local maven repo, and rebuild my project with 0.3.8-SNAPSHOT but still no success, the error persists. thx a lot for help! Marek
I'm having the same issue. I too tried the latest snapshot with no success. So unless someone comes up with a solid solution, I'm switching back to com.android.tools.build:gradle:1.3.1
Hi Thanos
can you confirm the issue is not present in 1.3.1 build tools?
thx a lot
Marek
2016-02-01 5:09 GMT+01:00 Thanos Psaridis (Fisherman) < notifications@github.com>:
I'm having the same issue. I too tried the latest snapshot with no success. So unless someone comes up with a solid solution, I'm switching back to com.android.tools.build:gradle:1.3.1
— Reply to this email directly or view it on GitHub https://github.com/groovy/groovy-android-gradle-plugin/issues/85#issuecomment-177753740 .
If you could provide a sample project that reproduces this issue I would better be able to help resolve it.
GroovyTest.zip Hello
attached see my project directory. I used just wizard to create android application with blank activity, then I added groovy functionality using gradle. now the error message is different from the one I got before, but still in same gradle task.
hope the sample project does help.
thx a lot Marek
@marek-jasovsky I have no problems whatsoever using the 1.3.1 build tools. You might wanna try it
Hi Thanos, I have tried with 1.3.1 but no success. as this is gradle, what do I need in order for project structure to be correct? look in the zip above for another test project, as the original contains some pieces of code I cannot give out thx a lot, Marek
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'org.codehaus.groovy:gradle-groovy-android-plugin:0.3.6'
}
}
apply plugin: 'com.android.application'
apply plugin: 'groovyx.grooid.groovy-android'
repositories {
mavenLocal()
jcenter()
}
android {
compileSdkVersion 23
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "fxxx"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
applicationIdSuffix '.dev'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
disable 'InvalidPackage' // lint sees references in the grooid jar to unavailable java classes
}
//packagingOptions {
// workaround for http://stackoverflow.com/questions/20673625/android-gradle-plugin-0-7-0-duplicate-files-during-packaging-of-apk
//exclude 'META-INF/LICENSE.txt'
//exclude 'META-INF/groovy-release-info.properties'
//}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'org.bouncycastle:bcprov-jdk16:1.45'
compile 'org.codehaus.groovy:groovy:2.4.5:grooid'
}
I modified @marek-jasovsky sample project and this is the configuration that works well for me.
thx. gonna try this. how to open it? import or open existing? and where was the conflict?
Marek
2016-02-01 17:27 GMT+01:00 Thanos Psaridis (Fisherman) < notifications@github.com>:
I modified @marek-jasovsky https://github.com/marek-jasovsky sample project and this is the configuration that works well for me.
GroovyTestFixed.zip https://github.com/groovy/groovy-android-gradle-plugin/files/112549/GroovyTestFixed.zip
— Reply to this email directly or view it on GitHub https://github.com/groovy/groovy-android-gradle-plugin/issues/85#issuecomment-178056068 .
Thx a lot for help to @ThanosFisherman 1.3.1. build tools works, and as the issue seems not to be related to this plugin, I am closing the ticket and thanks everyone once more for help!
Cheers, Marek
Hi
Android studio 1.5.1. fails building simple project, with groovy classes included.
app.gradle file follows:
In build I get error Error:Execution failed for task ':app:compileDebugGroovyWithGroovyc'.
I tried to include latest versions of all components, but build still fails.
can you recommend a setup, that works? maybe some specific versions of studio, java / plugins?
thx a lot
Marek