I got a problem when I want to build jar file dropbox. It's alway show the error
" E/AndroidRuntime(24171): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/dropbox/chooser/android/R$layout;" when I import dropboxchoosersdk.jar instead of all lib DropboxChooserSDK
It's run well when I reference all lib DropboxChooserSDK.
So I would like to build jar file Dropbox to setup auto build with gradle. Anyone got the same problem, please help me. Thank you.
I found the problem that we need follow some steps :
- Try to clean gradle build "gradle clean build" in terminal.
- Then we config the gradle setting file missing.
lintOptions {
abortOnError false
}
Here is my gradle file :
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
}
}
apply plugin: 'android-library'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.android.support:support-v4:13.0.+'
}
android {
lintOptions {
abortOnError false
}
compileSdkVersion 19
buildToolsVersion '19.1.0'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
Related
I always create Kotlin projects with Gradle: File -> New -> Project -> Gradle -> Kotlin/JVM.
The project works fine, however, IntelliJ IDEA highlights this part of the code:
build.gradle false warning
Is there a way to remove this warning?
This is the entire build.gradle file:
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion"
}
group "com.alelad"
version "1.0-SNAPSHOT"
allprojects {
apply plugin: "java"
apply plugin: "org.jetbrains.kotlin.jvm"
repositories {
mavenCentral()
jcenter()
}
dependencies {}
compileKotlin {
kotlinOptions {
jvmTarget = "13"
allWarningsAsErrors = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "13"
allWarningsAsErrors = true
}
}
}
Just remove compileKotlin and compileTestKotlin all together. They are deprecated now and your project should work just fine without them. That's what I'm doing and everything works great in all my projects.
I use Kotlin for server side, and I want to add test coverage (by using JaCoCo but can be any other open source).
At the moment, I don't find any documentation to explain how to enable/add coverage report to kotlin project based on kotest which actually works.
(Yes I tried the official documentation)
build.gradle.kts:
import Libraries.coroutines
import Libraries.koTest
import Libraries.koTestCore
import Libraries.mockk
import Libraries.testcontainers
import Libraries.testcontainersPostgres
plugins {
java
`kotlin-dsl` version "1.3.5" apply false
kotlin("jvm") version Versions.kotlin_version
kotlin("plugin.serialization") version Versions.kotlin_version apply false
id("com.diffplug.gradle.spotless") version Plugins.spotless
id("com.palantir.docker") version Plugins.docker apply false
id("com.palantir.docker-run") version Plugins.docker apply false
id("com.google.protobuf") version Plugins.protobuf apply false
id("org.flywaydb.flyway") version Plugins.flyway apply false
}
allprojects {
group = "my-app"
version = "2.0"
apply(plugin = "kotlin")
apply(plugin = "com.diffplug.gradle.spotless")
repositories {
mavenCentral()
jcenter()
}
tasks {
compileKotlin {
dependsOn(spotlessApply)
kotlinOptions {
jvmTarget = "11"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<Test> {
useJUnitPlatform()
maxParallelForks = 1
environment("ENV", "test")
}
afterEvaluate {
project.configurations.forEach {
// Workaround the Gradle bug resolving multiplatform dependencies.
if (it.name.contains("Proto")) {
it.attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, Usage.JAVA_RUNTIME))
}
}
}
}
subprojects {
spotless {
kotlin {
ktlint().userData(mapOf("disabled_rules" to "no-wildcard-imports"))
trimTrailingWhitespace()
endWithNewline()
}
}
dependencies {
implementation(coroutines)
testImplementation(koTest)
testImplementation(koTestCore)
testImplementation(mockk)
testImplementation(testcontainers)
testImplementation(testcontainersPostgres)
}
configurations {
all {
resolutionStrategy.setForcedModules("org.apache.httpcomponents:httpclient:4.5.9")
}
}
}
Any help will be great. Thanks in advance.
in my experience, Jacoco and Kotest interoperate just fine out of the box. I'm using it and all I need to do is the following:
plugins {
jacoco
// The rest of your plugins
}
// Your build, as it was before
You can inspect a working Jacoco + Kotest build here.
To verify that it works, you can e.g., feed the Jacoco generated data to services such as Codecov.io.
First, generate the report in XML format:
tasks.jacocoTestReport {
reports {
xml.isEnabled = true
}
}
And then use the Codecov.io service to fetch and analyze the results:
bash <(curl -s https://codecov.io/bash)
As you can see in this report, Jacoco is doing its job without further configuration.
I have an Android Studio (3.4.1) cocos2d-x project with multiple modules. My settings.gradle file defines the 3 modules:
include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../cocos2d/cocos/platform/android/libcocos2dx')
include ':ToaTetrisApp'
project(':ToaTetrisApp').projectDir = new File(settingsDir, 'app')
include ':gameCircleSDK'
NOTE: gameCircleSDK does not need its projectDir set because the directory matches the module name inside proj.android
The problem I have is that when I build a release build of the application OR I try to Build->Generate Signed Bundle / APK I get the following error:
>Task :ToaTetrisApp:transformClassesAndResourcesWithR8ForRelease FAILED
AGPBI: {"kind":"error","text":"Program type already present: com.amazon.ags.BuildConfig","sources":[{}],"tool":"D8"}
NOTE: com.amazon.ags.BuildConfig is an auto-generated class for the gameCircleSDK module. The AndroidManifest.xml for gameCircleSDK defines package="com.amazon.ags" and this is the only place that the package is defined.
I also searched my generated files and found only the expected BuildConfig.java files in the release folders: com.toa.tetris (ToaTetrisApp), com.amazon.ags (gameCircleSDK), org.cocos2dx.lib (cocos2d-x)
I have the following build.gradle files:
proj.android:build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
buildDir = "C:/tmp/${rootProject.name}/${project.name}"
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
proj.android:app:build.gradle [ToaTetrisApp]
import org.gradle.internal.os.OperatingSystem
apply plugin: 'com.android.application'
android {
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
defaultConfig {
applicationId "com.toa.tetris"
minSdkVersion PROP_MIN_SDK_VERSION
targetSdkVersion PROP_TARGET_SDK_VERSION
versionCode 21
versionName "4.5.1"
multiDexEnabled true
externalNativeBuild {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
targets 'MyGame'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
//arguments 'V=1'
arguments '-j' + Runtime.runtime.availableProcessors()
def module_paths = [project.file("../../cocos2d").absolutePath,
project.file("../../cocos2d/cocos").absolutePath,
project.file("../../cocos2d/external").absolutePath]
if (OperatingSystem.current().isWindows()) {
module_paths = module_paths.collect {it.replaceAll('\\\\', '/')}
arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
}
else {
arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
}
}
}
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'MyGame'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE"
cppFlags "-frtti -fexceptions -fsigned-char"
}
}
}
ndk {
abiFilters = []
abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String})
}
}
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "../../Resources"
}
externalNativeBuild {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
path "jni/Android.mk"
}
}
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}
}
}
signingConfigs {
release {
<CONTENT REMOVED>
}
debug {
<CONTENT REMOVED>
}
}
buildTypes {
release {
debuggable false
jniDebuggable false
renderscriptDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
}
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=0'
}
}
}
debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=1'
}
}
}
}
}
android.applicationVariants.all { variant ->
// delete previous files first
delete "${buildDir}/intermediates/assets/${variant.dirName}"
variant.mergeAssetsProvider.get().doLast {
copy {
from "${buildDir}/../../../Resources"
into "${buildDir}/intermediates/assets/${variant.dirName}"
exclude "**/*.gz"
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: '../gameCircleSDK/libs', include:['*.jar'])
implementation project(':libcocos2dx')
implementation project(':gameCircleSDK')
}
proj.android:gameCircleSDK:build.gradle
apply plugin: 'com.android.library'
android {
signingConfigs {
debug {
<CONTENT REMOVED>
}
}
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
//buildToolsVersion "28.0.3"
defaultConfig {
minSdkVersion PROP_MIN_SDK_VERSION
targetSdkVersion PROP_TARGET_SDK_VERSION
}
sourceSets.main {
manifest.srcFile "src/main/AndroidManifest.xml"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
//implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
}
proj.android:..:cocos2d:cocos:platform:android:libcocos2dx:build.gradle
apply plugin: 'com.android.library'
android {
signingConfigs {
debug {
<CONTENT REMOVED>
}
}
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
defaultConfig {
minSdkVersion PROP_MIN_SDK_VERSION
targetSdkVersion PROP_TARGET_SDK_VERSION
versionCode 1
versionName "1.0"
}
sourceSets.main {
aidl.srcDir "../java/src"
java.srcDir "../java/src"
manifest.srcFile "AndroidManifest.xml"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: '../java/libs', include: ['*.jar'])
}
I have been searching and found many recommendations and tried many of them to no avail. Here are some of the things I've tried:
I tried File->Invalidate Caches / Restart: NOTE: I originally had the same problem with my debug build and run and this is the solution that resolved that issue.
I have tried running 'gradlew ToaTetrisApp:dependencies' and I don't see any reference to com.amazon.ags nor any duplicates. I'm not sure I fully understand the output, but it seems for the debug, release and tests the dependencies seem to be as expected
I have, of course, tried to clean and rebuild many times, but to no avail
I have added 'multiDexEnabled true' to my app:build.gradle file. I'm not sure whether this really did anything or whether I added it to the correct file. This didn't seem to resolve the issue
I have tried to add 'afterEvaluate { generateReleaseBuildConfig.enabled = false }', but again, I wasn't sure which build.gradle to add this to so I couldn't get it to work
I'm hoping that someone can provide some explanation of what exactly this error means and how I can track down and resolve this issue myself. This project doesn't use a lot of external dependencies so I would expect that it would be easy to track down what is going on exactly and why this error shows up. If you would like to offer some suggestions then please let me know which gradle file you would like me to add the code to as that is often not mentioned.
Can any one help me out on this my app is multidex enabled and I am having issue on the android version 5 and below 5 my app is crashing due to the classnot found exception infact the class is present still.`
My Gradle file is -
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
repositories {
maven {
url 'http://repo.brightcove.com/releases'
}
}
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.weone.android"
minSdkVersion 16
targetSdkVersion 23
versionCode 31
versionName "1.2.2"
multiDexEnabled true
}
signingConfigs {
release {
storeFile file('/home/user/AndroidStudioProjects/WeOneWithExoPlayer/weone-android/certificate/WeOne.jks')
storePassword 'WeOneKey'
keyAlias 'weone'
keyPassword 'WeOneKey'
}
debug {
storeFile file('/home/user/.android/debug.keystore')
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
buildTypes {
debug {
// signingConfig signingConfigs.debug
}
release {
minifyEnabled false
//shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.release
// multiDexKeepFile file 'multidex-config.txt'
}
}
/* afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = []
}
dx.additionalParameters += '--multi-dex' // enable multidex
// optional
// dx.additionalParameters += "--main-dex-list=$projectDir/<filename>".toString() // enable the main-dex-list
}
}*/
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.squareup.retrofit2:retrofit:2.2.0') {
exclude module: 'okhttp'
}
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.squareup.okhttp3:okhttp:3.+'
compile 'com.squareup.okhttp3:logging-interceptor:3.+'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') {
exclude module: 'support-v4'
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.naver.android.helloyako:imagecropview:1.0.3'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'joda-time:joda-time:2.9.2'
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.android.support:multidex-instrumentation:1.0.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.2.+'
compile 'com.google.guava:guava:19.0'
compile 'com.brightcove.player:exoplayer:4.+'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.facebook.network.connectionclass:connectionclass:1.0.1'
compile 'com.plattysoft.leonids:LeonidsLib:1.3.2'
compile 'com.android.support:appcompat-v7:25.+'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.android.support:design:25.+'
compile 'com.android.support:cardview-v7:25.+'
compile 'com.android.support:recyclerview-v7:25.+'
compile 'com.android.support:support-v4:25.+'
compile 'com.github.jd-alexander:LikeButton:0.2.0'
compile 'com.turbomanage.basic-http-client:http-client-android:0.89'
compile 'com.google.apis:google-api-services-youtube:v3-rev182-1.22.0'
compile 'com.google.android.gms:play-services-ads:10.+'
compile 'com.google.android.gms:play-services-gcm:10.+'
compile 'com.google.android.gms:play-services:10.+'
compile 'com.hbb20:ccp:1.7.2'
compile 'com.google.android.gms:play-services-auth:10.+'
compile 'com.google.api-client:google-api-client-android:1.22.0'
configurations {
compile.exclude group: "org.apache.httpcomponents", module: "httpclient"
}
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.googlecode.libphonenumber:libphonenumber:7.1.1'
compile 'com.android.support:animated-vector-drawable:25.+'
compile 'com.android.support:customtabs:25.+'
compile 'com.android.support:mediarouter-v7:25.+'
}
And Project Gradle is -
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
repositories {
mavenCentral()
jcenter()
}
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
repositories {
mavenCentral()
maven {
url 'http://lorenzo.villani.me/android-cropimage/'
}
}
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
maven {
url "https://repo.eclipse.org/content/repositories/paho-releases/"
}
}
}
My app is crashng below 5 and I am stuck in it from last 2 weeks.
Haven't got solution till now. :(
stacktrace ---------------------------------------------------
04-06 16:10:33.314 21020-21020/com.weone.android E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.weone.android, PID: 21020
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/api/client/extensions/android/http/AndroidHttp;
at com.weone.android.utilities.helpers.constants.Config.<clinit>(Config.java:26)
at com.weone.android.utilities.helpers.constants.Config.setAppModeConfig(Config.java:0)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties.initThings(ApplicationProperties.java:59)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties.access$000(ApplicationProperties.java:29)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties$1.run(ApplicationProperties.java:44)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties.onCreate(ApplicationProperties.java:51)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1035)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4638)
at android.app.ActivityThread.access$1500(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.api.client.extensions.android.http.AndroidHttp" on path: DexPathList[[zip file "/data/app/com.weone.android-1/base.apk", zip file "/data/app/com.weone.android-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.weone.android-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.weone.android.utilities.helpers.constants.Config.<clinit>(Config.java:26)
at com.weone.android.utilities.helpers.constants.Config.setAppModeConfig(Config.java:0)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties.initThings(ApplicationProperties.java:59)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties.access$000(ApplicationProperties.java:29)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties$1.run(ApplicationProperties.java:44)
at com.weone.android.utilities.helpers.apporganizer.ApplicationProperties.onCreate(ApplicationProperties.java:51)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1035)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4638)
at android.app.ActivityThread.access$1500(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
Suppressed: java.lang.ClassNotFoundException: com.google.api.client.extensions.android.http.AndroidHttp
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 18 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
I am trying to setup a new scala project in IntelliJ (2016.3.4, built on January 31, 2017) with gradle. My build.gradle is as given below:
group 'org.microservices.architecture'
version '1.0-SNAPSHOT'
apply plugin: 'scala'
repositories {
mavenCentral()
}
dependencies {
compile 'org.scala-lang:scala-library:2.10.1'
}
tasks.withType(ScalaCompile) {
ScalaCompileOptions.metaClass.daemonServer = true
ScalaCompileOptions.metaClass.fork = true
ScalaCompileOptions.metaClass.useAnt = false
ScalaCompileOptions.metaClass.useCompileDaemon = false
}
dependencies {
compile group: 'com.typesafe.akka', name: 'akka-actor_2.11', version: '2.4.17'
compile group: 'org.scala-lang', name: 'scala-library', version: '2.12.1'
testCompile 'org.scalatest:scalatest_2.11:3.0.1'
testCompile 'junit:junit:4.12'
}
sourceSets {
main {
scala {
srcDirs = ['src/scala']
}
}
test {
scala {
srcDirs = ['test/scala']
}
}
}
The problem is I get following warning message:
The following repositories used in your gradle projects were not indexed yet: https://repo1.maven.org/maven2.
If you want to use dependency completion for these repositories
artifacts, Open Repositories List, select required repositories and
press "Update" button.