tobykurien / Xtendroid

Xtendroid is a DSL (domain-specific language) for Android that greatly reduces boilerplate code while providing great tooling support
MIT License
242 stars 23 forks source link

AndroidStudio 3.0 incompatible with xtext-android-plugin #137

Open Buggaboo opened 7 years ago

Buggaboo commented 7 years ago

I complained about it here

tobykurien commented 6 years ago

Are there any workarounds for this? I've managed to get it to work by downgrading to Gradle v3.5.1.

My /build.gradle file now looks like:

buildscript {
    repositories {
        //google()
        maven {
          url "https://maven.google.com"
        }
    mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
    }
}

allprojects {
    repositories {
        //google()
        maven {
          url "https://maven.google.com"
        }
        jcenter()
    }
}

And my /app/build.gradle looks like:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.xtext:xtext-android-gradle-plugin:1.0.20'
    }
}

apply plugin: 'org.xtext.android.xtend'
apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"
    defaultConfig {
       ...
    }
    ...
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:support-v4:26.1.0'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'

    compile 'org.eclipse.xtend:org.eclipse.xtend.lib:2.9.2'
    compile 'com.github.tobykurien:xtendroid:0.13'

    testCompile 'junit:junit:4.12'
    androidTestCompile 'com.android.support.test:runner:1.0.1'
    androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
    androidTestCompile 'com.android.support:support-annotations:26.1.0'
}