Giter VIP home page Giter VIP logo

Comments (14)

JRosanowski avatar JRosanowski commented on August 17, 2024 3

I had to change the gradle version to 1.3.1

from gradle-android-scala-plugin.

GildedHonour avatar GildedHonour commented on August 17, 2024

up

from gradle-android-scala-plugin.

gpampara avatar gpampara commented on August 17, 2024

Any update on this? This is using com.android.tools.build:gradle:1.5.0

from gradle-android-scala-plugin.

nexoscp avatar nexoscp commented on August 17, 2024

Property "bootClasspath" doesn't exist anymore. Instead there is an helper method with the same name but different signature:

https://android.googlesource.com/platform/tools/build/+/master/builder/src/main/java/com/android/builder/AndroidBuilder.java

static List<String> getBootClasspath(SdkParser sdkParser)

a SdkParser instance could be retrieved via

https://android.googlesource.com/platform/tools/build/+/master/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy#316 getSdkParser()

A change in

https://github.com/saturday06/gradle-android-scala-plugin/blob/master/src/main/groovy/jp/leafytree/gradle/AndroidScalaPlugin.groovy#L216

from

scalaCompileTask.classpath = javaCompileTask.classpath + project.files(androidPlugin.androidBuilder.bootClasspath)

to

scalaCompileTask.classpath = javaCompileTask.classpath + project.files(AndroidBuilder.getBootClasspath(androidPlugin.sdkParser))

should do the trick.

from gradle-android-scala-plugin.

upsuper avatar upsuper commented on August 17, 2024

This is a duplicate of #73

from gradle-android-scala-plugin.

dkovalkov avatar dkovalkov commented on August 17, 2024

Please update plugin on jcenter with latest android plugin support.

from gradle-android-scala-plugin.

ashwinbhaskar avatar ashwinbhaskar commented on August 17, 2024

Why is this issues still there?

from gradle-android-scala-plugin.

pblandford avatar pblandford commented on August 17, 2024

I can see a fix has been committed a while back but it it going to released soon? I'm stuck using gradle 1.3.1 till this is resolved.. :(

from gradle-android-scala-plugin.

xelnaga avatar xelnaga commented on August 17, 2024

Unsure where the original author of the plugin is, but the pull request / fork below contains some tweaks to make the plugin work with the current android studio (2.1.2) and the version of gradle it uses (2.10)

#87
https://github.com/xelnaga/gradle-android-scala-plugin

You can checkout the source to your local machine and build the jar yourself with ./gradle clean assemble

Copy the jar produced to your project lib directory and add it as a library dependency in your root build.gradle as below:

`
dependencies {

    classpath 'com.android.tools.build:gradle:2.1.2',
              fileTree(dir: 'lib', include: ['gradle-android-scala-plugin-1.5-SNAPSHOT.jar'])
}

`

Im using it with the latest build tools and Android studio just fine.

from gradle-android-scala-plugin.

pblandford avatar pblandford commented on August 17, 2024

That worked - many thanks!

from gradle-android-scala-plugin.

dvg4000 avatar dvg4000 commented on August 17, 2024

@xelnaga, @pblandford, could you please show how build.gradle and app/build.gradle should look like?

with such files:

build.gradle (root)

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2',
                fileTree(dir: 'app/libs', include: ['gradle-android-scala-plugin-1.5-SNAPSHOT.jar'])
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

and app/build.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:2.1.2"
        classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.5-SNAPSHOT"
    }
}

apply plugin: 'com.android.application'
apply plugin: 'jp.leafytree.android-scala'

android {

    compileSdkVersion 23
    buildToolsVersion "23.0.3"
...
...

i'm getting error:

Error:Could not find jp.leafytree.gradle:gradle-android-scala-plugin:1.5-SNAPSHOT.
Searched in the following locations:
...
...

from gradle-android-scala-plugin.

xelnaga avatar xelnaga commented on August 17, 2024

You should not have the buildscript block in app/build.gradle at all.

The remainder looks correct, but you should obviously have the jar at whatever location your fileTree is specifying.

Be advised that latest Android Studio 2.1 release unfortunately does not play nice with Scala due to an incompatibility between the Gradle version's scala code and the IntelliJ version they are using for that release.

I've worked around the issue by going straight to the Android Studio 2.2 beta 3 release using the changes I've made on this branch.

https://github.com/xelnaga/gradle-android-scala-plugin/tree/2.2

My gradle files look like the following...

/build.gradle

buildscript {

repositories {
    jcenter()
}

dependencies {

    classpath 'com.android.tools.build:gradle:2.2.0-beta3',
              fileTree(dir: 'lib', include: ['gradle-android-scala-plugin-2.2-SNAPSHOT.jar'])
}

}

allprojects {

repositories {
    jcenter()
}

}
...

app/build.gradle

apply plugin: 'com.android.application'
apply plugin: 'jp.leafytree.android-scala'

repositories {

maven {
    url "https://jitpack.io"
}

maven {
    url "http://jcenter.bintray.com"
}

}

android {

compileSdkVersion 24
buildToolsVersion "23.0.3"

....

Those repos may not necessarily be needed.

The gradle version now used is 2.14.1

from gradle-android-scala-plugin.

dvg4000 avatar dvg4000 commented on August 17, 2024

@xelnaga, thank you very much! it's working. 👍

from gradle-android-scala-plugin.

lioliy avatar lioliy commented on August 17, 2024

when I change to yours
Got an ERROR
Plugin with id 'jp.leafytree.android-scala' not found.

from gradle-android-scala-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.