When I am running
gradlew build --refresh-dependencies
I get errors like
Execution failed for task ':react-native-fcm:lint'.
When I see lint-results.html I get error like
../../build.gradle: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 26.1.0, 23.4.0. Examples include com.android.support:support-compat:26.1.0 and com.android.support:animated-vector-drawable:23.4.0
../../build.gradle: All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 17.3.4, 17.0.4, 17.0.1, 16.2.4, 16.0.6, 16.0.5, 16.0.4, 16.0.3, 16.0.1, 16.0.0. Examples include com.google.firebase:firebase-messaging:17.3.4 and com.google.firebase:firebase-iid:17.0.4
my build.gradle looks like this
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
entryFileforesatte: "index.foresatte.js",
bundleInRelease: true,
bundleInelevRelease: true,
bundleInforesatteRelease: true
]
apply from: "../flavored-react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
def enableProguardInReleaseBuilds = false
android {
lintOptions {
abortOnError false
}
compileSdkVersion 27
flavorDimensions "default"
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.osloskolen"
minSdkVersion 16
targetSdkVersion 26
versionCode 28
versionName "1.28.0"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
productFlavors {
elev {
minSdkVersion 16
applicationId ''
targetSdkVersion 22
}
foresatte {
minSdkVersion 16
applicationId ''
targetSdkVersion 22
}
}
signingConfigs {
release {
if (project.hasProperty('OSLOSKOLEN_RELEASE_STORE_FILE')) {
storeFile rootProject.file(OSLOSKOLEN_RELEASE_STORE_FILE)
storePassword OSLOSKOLEN_RELEASE_STORE_PASSWORD
keyAlias OSLOSKOLEN_RELEASE_KEY_ALIAS
keyPassword OSLOSKOLEN_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
debug {
buildConfigField "String", "CODEPUSH_KEY", ''
manifestPlaceholders = [excludeSystemAlertWindowPermission: "false"]
}
/*releaseStaging {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", ''
}*/
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
manifestPlaceholders = [excludeSystemAlertWindowPermission: "true"]
//buildConfigField "String", "CODEPUSH_KEY", ''
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
compile project(':react-native-code-push')
compile project(':react-native-vector-icons')
compile project(':react-native-sound')
compile project(':react-native-fs')
compile project(':react-native-fcm')
compile 'com.google.firebase:firebase-core:16.0.0'
compile project(':react-native-document-picker')
compile project(':react-native-doc-viewer')
compile project(':react-native-splash-screen')
compile project(':appcenter-crashes')
compile project(':appcenter-analytics')
compile project(':appcenter')
compile project(':react-native-code-push')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
I am not sure where the issue is. I have added
lintOptions {
abortOnError false
}
but still I get this error. I want to solve this error. Any insight?
Related
i work with jetpack compose and kotlin, when i add new dependency (i don't know which one cause error) after i sync dependency and run app, error like below, i don't know why
What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
I don't know why this error. It's error when I run the app.
This is my module level dependency :
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'com.google.dagger.hilt.android'
id 'com.google.gms.google-services'
}
android {
namespace 'com.haristudio.pdi_app'
compileSdk 33
defaultConfig {
applicationId "com.haristudio.pdi_app"
minSdk 23
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.2.0'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation "com.google.accompanist:accompanist-systemuicontroller:0.27.0"
// Jetpack Compose
def compose_version = "1.2.0"
def kotlin_coroutines_version = "1.6.4"
def dagger_version = "2.44.2"
def compose_latest = "1.3.3"
implementation 'androidx.activity:activity-compose:1.6.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_latest"
implementation 'androidx.compose.material:material:1.3.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_latest"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_latest"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_latest"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation "androidx.navigation:navigation-compose:2.5.3"
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
implementation 'androidx.compose.material:material-icons-extended:1.3.1'
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
implementation "androidx.compose.runtime:runtime-livedata:1.3.3"
implementation "androidx.compose.foundation:foundation:1.4.0-beta01"
implementation "androidx.compose.runtime:runtime-rxjava2:1.4.0-beta01"
//coil for images
implementation "io.coil-kt:coil-compose:2.2.2"
// exoPlayer
implementation 'com.google.android.exoplayer:exoplayer:2.18.2'
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
// Dagger Hilt
implementation "com.google.dagger:hilt-android:$dagger_version"
kapt "com.google.dagger:hilt-compiler:$dagger_version"
// Firebase
implementation platform('com.google.firebase:firebase-bom:31.2.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation "com.google.firebase:firebase-auth:21.1.0"
implementation 'com.google.firebase:firebase-database:20.1.0'
}
This is my project level dependency
buildscript {
ext {
compose_ui_version = '1.2.0'
}
dependencies {
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.42"
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.0' apply false
id 'com.android.library' version '7.4.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
id 'com.google.dagger.hilt.android' version '2.42' apply false
id 'com.google.gms.google-services' version '4.3.14' apply false
}
This is my authViewModel
#HiltViewModel
class AuthViewModel #Inject constructor(
private val repository : AuthRepository,
) : ViewModel() {
private val _loginFlow = MutableStateFlow<Resource<FirebaseUser>?>(null)
private val _signUpFlow = MutableStateFlow<Resource<FirebaseUser>?>(null)
val loginFlow: StateFlow<Resource<FirebaseUser>?> = _loginFlow
val signUpFlow: StateFlow<Resource<FirebaseUser>?> = _signUpFlow
private val currentUser : FirebaseUser?
get() = repository.currentUser
init {
if(currentUser != null){
_loginFlow.value = Resource.Success(currentUser!!)
}
}
fun login(email : String, password : String) = viewModelScope.launch {
_loginFlow.value = Resource.Loading
val result = repository.login(email,password)
_loginFlow.value = result
}
fun signUp(
username : String,
email : String,
password : String,
numberPhone : String,
image : String = "null",
navController: NavController
) = viewModelScope.launch {
_signUpFlow.value = Resource.Loading
val result = repository.signUp(username,email,password,image,numberPhone)
_signUpFlow.value = result
if (result is Resource.Success) {
navController.navigate("addNewTeam_screen")
}
}
fun logout(){
repository.logout()
_loginFlow.value = null
_signUpFlow.value = null
}
}
this is my authrepositoryImpl
class AuthRepositoryImpl #Inject constructor(
private val firebaseAuth: FirebaseAuth
) : AuthRepository {
override val currentUser: FirebaseUser?
get() = firebaseAuth.currentUser
override suspend fun login(
email: String,
password: String
): Resource<FirebaseUser> {
return try {
val result = firebaseAuth.signInWithEmailAndPassword(email,password).await()
Resource.Success(result.user!!)
}catch (e : Exception){
Resource.Failure(exception = e)
}
}
override suspend fun signUp(
username: String,
email: String,
password: String,
image: String,
numberPhone: String
): Resource<FirebaseUser> {
return try {
val result = firebaseAuth.createUserWithEmailAndPassword(email, password).await()
result?.
user?.
updateProfile(
UserProfileChangeRequest
.Builder()
.setDisplayName(username)
.build()
)?.await()
Resource.Success(result.user!!)
}catch (e : Exception){
Resource.Failure(exception = e)
}
}
override fun logout() {
firebaseAuth.signOut()
}
}
I'm trying to create a TornadoFx project in IntelliJ ide..
on build it shows the error
Error: JavaFX runtime components are missing, and are required to run this application
here's the build.gradle file
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.40'
id 'org.openjfx.javafxplugin' version '0.0.7'
}
javafx {
version = "12"
modules = ['javafx.controls', 'javafx.base', 'javafx.fxml', 'javafx.graphics']
}
group 'tornado1'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation 'no.tornado:tornadofx:1.7.19'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
and a screenshot of the libraries in the project structure
Android Release apk has stopen when open it in react -native
*****E/AndroidRuntime: FATAL EXCEPTION: Thread-3
Process: com.reactapp, PID: 4023
java.lang.ExceptionInInitializerError
at com.facebook.react.bridge.p.a(Unknown Source)
at com.facebook.react.k$5.run(Unknown Source)
at java.lang.Thread.run(Thread.java:761)
****Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.react.bridge.ProxyJavaScriptExecutor" on path: DexPathList[[zip file "/data/app/com.reactapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.reactapp-2/lib/arm, /data/app/com.reactapp-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /system/vendor/lib]]****
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Runtime.nativeLoad(Native Method)
at java.lang.Runtime.doLoad(Runtime.java:1060)
at java.lang.Runtime.load0(Runtime.java:895)
at java.lang.System.load(System.java:1505)
at com.facebook.l.b.a(Unknown Source)
at com.facebook.l.b.a(Unknown Source)
at com.facebook.l.g.a(Unknown Source)
at com.facebook.l.g.a(Unknown Source)
at com.facebook.react.bridge.ao.a(Unknown Source)
at com.facebook.react.bridge.NativeMap.<clinit>(Unknown Source)
at com.facebook.react.bridge.p.a(Unknown Source)
at com.facebook.react.k$5.run(Unknown Source)
at java.lang.Thread.run(Thread.java:761)*****
What Should I do For That can Any One Help Me For that
I am use here react-native-fcm and react-native-device-info in this project
#
List item Build.gradle gere
#
`android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.reactapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
}
packagingOptions {
exclude "lib/arm64-v8a/librealm-jni.so"
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk true // If true, also generate a universal APK
}
}
sourceSets {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
}
}
/* packagingOptions {
exclude '/lib/mips64/**'
exclude '/lib/arm64-v8a/**'
exclude '/lib/x86_64/**'
}*/
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation project(':react-native-fcm')
implementation fileTree(dir: "libs", include: ["*.jar"])
// implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:appcompat-v7:27.1.1"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-device-info')
/*implementation 'com.android.support:multidex:1.0.0'*/
implementation 'com.google.code.gson:gson:2.8.5'
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: "com.google.gms.google-services"
In my Gradle project, I have a dependency for SQLite.
Here is my build.gradle:
import groovy.sql.Sql
buildscript {
ext{
osPackageVersion = "3.4.0"
kotlin_version = '1.2.41'
requery_version = '1.5.1'
sqlite_jdbc = '3.7.2'
rxkotlin_version = '2.2.0'
sqlDirPath = "src" + File.separator + "main" + File.separator + "Resources" + File.separator + "TestAppDbInit.sql"
}
repositories {
mavenCentral()
jcenter()
maven{
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "edu.sc.seis.gradle:launch4j:2.4.4"
classpath group: 'org.jooq', name: 'jooq-meta-extensions', version: '3.11.2'
classpath 'org.jooq:jooq-codegen:3.11.2'
classpath 'org.xerial:sqlite-jdbc:3.7.2'
}
}
plugins {
id 'java'
id 'nu.studer.jooq' version '3.0.1'
}
group 'org.wycliffeassociates.translationrecorder'
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'
apply plugin: 'edu.sc.seis.launch4j'
sourceCompatibility = 1.8
configurations {
sqllite
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io'}
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://mvnrepository.com/artifac/'}
maven { url "https://dl.bintray.com/kotlin/exposed" }
maven { url "https://dl.bintray.com/dua3/public" }
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile "no.tornado:tornadofx:1.7.16"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "com.github.thomasnield:rxkotlinfx:2.2.2"
compile "io.reactivex.rxjava2:rxkotlin:$rxkotlin_version"
compile 'org.jooq:jooq:3.11.2'
compile group: 'org.xerial', name: 'sqlite-jdbc', version: "$sqlite_jdbc"
jooqRuntime group: 'org.jooq', name: 'jooq-meta-extensions', version: '3.11.2'
jooqRuntime 'org.xerial:sqlite-jdbc:3.7.2'
sqllite 'org.xerial:sqlite-jdbc:3.7.2'
kapt "io.requery:requery-processor:$requery_version"
compile "com.squareup.retrofit2:retrofit:2.0.0"
compile "com.squareup.retrofit2:converter-moshi:2.0.0"
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
compile 'com.google.dagger:dagger:2.16'
kapt 'com.google.dagger:dagger-compiler:2.16'
implementation 'com.github.WycliffeAssociates:8woc2018-common:dev-SNAPSHOT'
compile 'com.github.WycliffeAssociates:jdenticon-kotlin:-SNAPSHOT'
compile 'de.jensd:fontawesomefx-commons:9.1.2-jpms'
compile 'de.jensd:fontawesomefx-materialicons:2.2.0-9.1.2-jpms'
compile 'de.jensd:fontawesomefx-icons525:4.2.0-9.1.2-jpms'
compile 'com.github.afester.FranzXaver:Examples:0.1'
compile 'com.jfoenix:jfoenix:8.0.5' // Java 8
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile "org.mockito:mockito-core:2.+"
testCompile "org.mockito:mockito-core:2.+"
testCompile 'org.powermock:powermock-module-junit4:2.+'
testCompile 'org.powermock:powermock-module-junit4-rule:2.+'
testCompile 'org.powermock:powermock-api-mockito2:2.+'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
URLClassLoader loader = GroovyObject.class.classLoader
configurations.sqllite.each { File file ->
loader.addURL(file.toURL())
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
I try to run the build for the project, and I get the following error:
Caused by: org.gradle.api.InvalidUserDataException: Cannot change strategy of configuration ':sqllite' after it has been resolved.
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.preventIllegalMutation(DefaultConfiguration.java:896)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.validateMutation(DefaultConfiguration.java:867)
at org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.DefaultCachePolicy.eachModule(DefaultCachePolicy.java:161)
at org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.DefaultCachePolicy.cacheChangingModulesFor(DefaultCachePolicy.java:121)
at org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.DefaultResolutionStrategy.cacheChangingModulesFor(DefaultResolutionStrategy.java:190)
at org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.DefaultResolutionStrategy.cacheChangingModulesFor(DefaultResolutionStrategy.java:186)
at org.gradle.api.artifacts.ResolutionStrategy$cacheChangingModulesFor.call(Unknown Source)
at build_2rl70kyg6ax354v7xbsnpa8n1$_run_closure8.doCall(C:\Users\dipinton\8woc2018-jvm\build.gradle:114)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:155)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:106)
at org.gradle.util.ConfigureUtil$WrappedConfigureAction.execute(ConfigureUtil.java:167)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:158)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:174)
at org.gradle.api.DomainObjectCollection$all.call(Unknown Source)
at build_2rl70kyg6ax354v7xbsnpa8n1.run(C:\Users\dipinton\8woc2018-jvm\build.gradle:113)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:90)
... 99 more
It's my impression that this error I'm receiving has to do with the fact that I have 2 configurations blocks. One for configuring my SQLite module, and another for handling the resolution strategy of all modules. These two closures seem to be conflicting with one another.
Does anyone have any suggestions on how to remove the conflict between these two closures?
This working with addUrl on the copy of configuration:
def sqliteCopy = configurations.sqlite.copy()
sqliteCopy.each {File file ->
loader.addURL(file.toURI().toURL())
}
instead of:
configurations.sqllite.each { File file ->
loader.addURL(file.toURL())
}
or downgrade com.android.tools.build:gradle to 3.1.4 version.
I am using gretty as my container for building my spring project . But when i issue the command gradle clean or gradle jettyRun ,i am getting the following problem
Cannot add task ':jettyRun' as a task with that name already exists.
PFB my build.gradle file
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
apply plugin: 'jetty' //too old, Jetty6, use gretty
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'idea'
apply plugin: 'jacoco' //code coverage
def springVersion = "4.2.4.RELEASE"
def jdkVersion = 1.8
def junitVersion = "4.12"
def logbackVersion = "1.1.3"
def jclOverSlf4jVersion = "1.7.14"
def jstlVersion = "1.2"
def hamcrestVersion = "1.3"
def servletApiVersion = "3.1"
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
repositories {
mavenLocal()
mavenCentral()
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
configurations.all {
exclude group: "commons-logging", module: "commons-logging"
}
dependencies {
compile 'org.slf4j:jcl-over-slf4j:' + jclOverSlf4jVersion
compile 'ch.qos.logback:logback-classic:' + logbackVersion
compile 'org.springframework:spring-webmvc:' +springVersion
compile 'javax.servlet:jstl:' + jstlVersion
compile 'org.springframework:spring-test:' + springVersion
//exclude the build in hamcrest
testCompile('junit:junit:' + junitVersion) {
exclude group: 'org.hamcrest'
}
testCompile 'org.hamcrest:hamcrest-library:' + hamcrestVersion
//include in compile only, exclude in the war
providedCompile 'javax.servlet:javax.servlet-api:' + servletApiVersion
}
//Gretty
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.akhikhl.gretty:gretty:+'
}
}
gretty {
//port = 9000
contextPath = 'loanSharks'
servletContainer = 'jetty9'
}
//For Eclipse IDE only
eclipse {
wtp {
component {
//define context path, default to project folder name
contextPath = 'loanSharks'
}
}
}
jacoco {
toolVersion = "0.7.5+"
reportsDir = file("$buildDir/reports/jacoco")
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
Even removes plugin: 'jetty', but I am being still with the error:
Execution failed for task ':jettyRun'.
Cannot call TaskInputs.property(String, Object) on task ':jettyRun' after task has started execution.