/scala-android-plugin-1

Scala support for Android Gradle project.

Primary LanguageJavaApache License 2.0Apache-2.0

Scala language support for Android

Tested on a popular Android App.

Supported versions

Example project

https://github.com/onsqcorp/hello-scala-android

Installation

Apply plugin

build.gradle.kts

buildscript {
    dependencies {
        classpath("com.soundcorset:scala-android-plugin:24.1019.1546")
        // ...
    }
}

apply(plugin = "com.soundcorset.scala-android")

Add scala-library dependency

The plugin decides scala language version using scala-library's version.

build.gradle.kts

dependencies {
    implementation("org.scala-lang:scala-library:2.13.16")
}

Build from the source and apply it to your project

  • Clone this repository
  • Run publishToMavenLocal gradle command
  • In the console, the artifact name com.soundcorset:scala-android-plugin:yy.MMdd.HHmm will be displayed (version changed for each time).
  • Set it in your project's build.gradle.kts:
buildscript {
    repositories {
        mavenLocal() // needed to access local repository
        // ...
    }
    dependencies {
        classpath("com.soundcorset:scala-android-plugin:yy.MMdd.HHmm")
        // ...
    }
}