using gradle with below sourceSets :
sourceSets{
main{
output.classesDir = new File(buildDir, "classes/java/main")
}
}
according to https://docs.gradle.org/4.0-rc-2/release-notes.html
i still having the error :
Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
Please help, my tomcat serer runs overall, but i like to get rid with this message.
Here my gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-tomcat-plugin:2.3'
}
}
apply plugin: 'com.bmuschko.tomcat'
apply plugin: 'java'
apply plugin: 'war'
sourceSets{
main{
output.classesDir = new File(buildDir, "classes/java/main")
}
}
sourceCompatibility = 1.8
version = '1.0'
ext {
javaVersion = 1.8
springVersion = '4.3.10.RELEASE'
aspectjVersion = '1.8.10'
slf4jVersion = '1.7.25'
}
dependencies {
compile (group: 'org.springframework', name: 'spring-context', version: springVersion){
exclude group: 'commons-logging', module: 'commons-logging'
}
compile group: 'org.springframework', name: 'spring-webmvc', version: springVersion
compile group: 'org.aspectj', name: 'aspectjrt', version: aspectjVersion
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4jVersion
testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion
compile (group: 'log4j', name: 'log4j', version: '1.2.17') {
exclude group: 'javax.mail', module: 'mail'
exclude group: 'javax.jms', module: 'jms'
exclude group: 'com.sun.jdmk', module: 'jmxtools'
exclude group: 'com.sun.jmx', module: 'jmxri'
}
compile group: 'javax.inject', name: 'javax.inject', version: '1'
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
providedCompile group: 'javax.servlet.jsp', name: 'javax.servlet.jsp-api', version: '2.3.1'
compile group: 'javax.servlet', name: 'jstl', version: '1.2'
testCompile 'junit:junit:4.12'
}
repositories {
mavenCentral()
}
dependencies {
def tomcatVersion = '8.5.16'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:8.5.2",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}
tomcat {
httpProtocol = 'org.apache.coyote.http11.Http11Nio2Protocol'
ajpProtocol = 'org.apache.coyote.ajp.AjpNio2Protocol'
httpPort = 8080
contextPath = '/'
}
Related
original question. How do I update the transitive dependency of cordApp to use Artemis 2.5.0. I'm following this corda-ftp demo. Updated the build.gradle as shown below. when I do gradle dependencies I see Artemis 2.5.0 wins but somehow the nodes pick up 2.2.0 as I can see in classpath in nodes logs.
buildscript {
ext.corda_release_version = '3.1-corda'
ext.corda_gradle_plugins_version = '3.1.0'
ext.quasar_version = '0.7.9'
ext.junit_version = '4.12'
ext.spring_boot_version = '2.0.2.RELEASE'
ext.corda_release_group = 'net.corda'
ext.kotlin_version = '1.1.60'
ext.username = "corda"
ext.password = "corda_initial_password"
ext.client_port = 10009
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "net.corda.plugins:cordapp:$corda_gradle_plugins_version"
classpath "net.corda.plugins:cordformation:$corda_gradle_plugins_version"
classpath "net.corda.plugins:quasar-utils:$corda_gradle_plugins_version"
classpath "io.spring.gradle:dependency-management-plugin:1.0.5.RELEASE"
}
}
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/exposed' }
maven { url 'https://jitpack.io' }
maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases' }
maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-dev/' }
}
apply plugin: 'kotlin'
apply plugin: "io.spring.dependency-management"
apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.quasar-utils'
dependencyManagement {
dependencies {
dependencySet(group: 'org.apache.activemq', version: '2.5.0') {
entry 'artemis-amqp-protocol'
entry 'artemis-commons'
entry 'artemis-core-client'
entry 'artemis-jdbc-store'
entry 'artemis-jms-client'
entry 'artemis-journal'
entry 'artemis-native'
entry 'artemis-selector'
entry 'artemis-server'
}
}
}
sourceSets {
main {
resources {
srcDir "config/dev"
}
}
test {
resources {
srcDir "config/test"
}
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testCompile "junit:junit:$junit_version"
// Corda integration dependencies
cordaCompile "$corda_release_group:corda-core:$corda_release_version"
cordaCompile "$corda_release_group:corda-finance:$corda_release_version"
cordaCompile "$corda_release_group:corda-jackson:$corda_release_version"
cordaCompile "$corda_release_group:corda-rpc:$corda_release_version"
cordaCompile "$corda_release_group:corda-node-api:$corda_release_version"
cordaCompile "$corda_release_group:corda-webserver-impl:$corda_release_version"
cordaRuntime "$corda_release_group:corda:$corda_release_version"
cordaRuntime "$corda_release_group:corda-webserver:$corda_release_version"
testCompile "$corda_release_group:corda-test-utils:$corda_release_version"
testCompile "$corda_release_group:corda-node-driver:$corda_release_version"
// GraphStream: For visualisation (required by TemplateClientRPC app)
compile "org.graphstream:gs-core:1.3"
compile("org.graphstream:gs-ui:1.3") {
exclude group: "bouncycastle"
}
// CorDapp dependencies
// Specify your cordapp's dependencies below, including dependent cordapps
compile "io.reactivex:rxjava:1.2.4"
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
languageVersion = "1.1"
apiVersion = "1.1"
jvmTarget = "1.8"
javaParameters = true // Useful for reflection.
}
}
def copyConfigTask(nodeName) {
return tasks.create("copy${nodeName}", Copy) {
from "${nodeName}.json"
into "./build/nodes/${nodeName}/"
rename {
"cordaftp.json"
}
}
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', copyConfigTask("CorpA"), copyConfigTask("CorpB")]) {
directory "./build/nodes"
node {
name "O=R3Corp,OU=corda,L=London,C=GB"
notary = [validating : false]
p2pPort 10002
rpcSettings {
address("localhost:10003")
adminAddress("localhost:10043")
}
cordapps = []
}
node {
name "O=CorpA,L=Paris,C=FR"
p2pPort 10005
rpcSettings {
address("localhost:10006")
adminAddress("localhost:10046")
}
extraConfig = [
jvmArgs : [ "-Xmx1g"],
attachmentContentCacheSizeMegaBytes: 100
]
cordapps = []
// TODO: Replace username / password with vars such that we can DRY the username, password
rpcUsers = [[ "user": "corda", "password": "corda_initial_password", "permissions": ["ALL"]]]
}
node {
name "O=CorpB,L=Rome,C=IT"
p2pPort 10008
rpcSettings {
address("localhost:10009")
adminAddress("localhost:10049")
}
extraConfig = [
jvmArgs : [ "-Xmx1g"],
attachmentContentCacheSizeMegaBytes: 100
]
cordapps = []
// TODO: Ditto
rpcUsers = [[ "user": "corda", "password": "corda_initial_password", "permissions": ["ALL"]]]
}
}
task(runClientB, dependsOn: 'classes', type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.cordaftp.SenderKt'
args "localhost:$client_port", "$username", "$password", "build/nodes/CorpB/cordaftp.json"
}
You cannot control which versions of dependencies the nodes use internally. You can only control the dependencies used by your CorDapp.
I am trying to integrate the two examples (Corda java template: https://github.com/corda/cordapp-template-java and Oracle example: https://github.com/corda/oracle-example ) so as to integrate Oracle node in the template.
I changed build.gradle, settings.gradle and copied base and service package to template folder. Though, the project is not logically linked as Oracle corresponds to different service, it does compiles and create classes under build folder successfully. After re-syncing gradle project, the gradle tasks were successfully updated and I am able to run deployNodes successfully.
However, no jar is present in build/nodes/Oracle/cordapp folder.
Kindly advise if additional changes needs to be done.
Git url for changes made: https://github.com/ashubisht/cordapp-template-java/tree/OracleIntegration_IOURelV3_0307
Here's the updated gradle file
buildscript {
ext.corda_release_group = 'net.corda'
ext.corda_release_version = '3.1-corda'
ext.corda_gradle_plugins_version = '3.1.0'
ext.junit_version = '4.12'
ext.quasar_version = '0.7.9'
ext.kotlin_version = '1.1.60'
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "net.corda.plugins:cordapp:$corda_gradle_plugins_version"
classpath "net.corda.plugins:cordformation:$corda_gradle_plugins_version"
classpath "net.corda.plugins:quasar-utils:$corda_gradle_plugins_version"
}
}
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases' }
}
apply plugin: 'kotlin'
apply plugin: 'java'
apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.quasar-utils'
sourceSets {
main {
resources {
srcDir "config/dev"
}
}
test {
resources {
srcDir "config/test"
}
}
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
dependencies {
testCompile "junit:junit:$junit_version"
// Corda integration dependencies
cordaCompile "$corda_release_group:corda-core:$corda_release_version"
cordaCompile "$corda_release_group:corda-finance:$corda_release_version"
cordaCompile "$corda_release_group:corda-jackson:$corda_release_version"
cordaCompile "$corda_release_group:corda-rpc:$corda_release_version"
cordaCompile "$corda_release_group:corda-node-api:$corda_release_version"
cordaCompile "$corda_release_group:corda-webserver-impl:$corda_release_version"
cordaRuntime "$corda_release_group:corda:$corda_release_version"
cordaRuntime "$corda_release_group:corda-webserver:$corda_release_version"
testCompile "$corda_release_group:corda-node-driver:$corda_release_version"
// CorDapp dependencies
// Specify your CorDapp's dependencies below, including dependent CorDapps.
// We've defined Cash as a dependent CorDapp as an example.
cordapp project(":cordapp")
cordapp project(":cordapp-contracts-states")
//Added oracle support to template for testing/ experimenting configs
cordapp project(":base")
cordapp project(":service")
//Oracle changes end here
cordapp "$corda_release_group:corda-finance:$corda_release_version"
}
task integrationTest(type: Test, dependsOn: []) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-parameters" // Required for passing named arguments to your flow via the shell.
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
node {
name "O=Notary,L=London,C=GB"
notary = [validating : true]
p2pPort 10002
cordapps = [
"$project.group:cordapp-contracts-states:$project.version",
"$project.group:cordapp:$project.version",
"$corda_release_group:corda-finance:$corda_release_version"
]
}
node {
name "O=PartyA,L=London,C=GB"
p2pPort 10005
rpcSettings {
address("localhost:10006")
adminAddress("localhost:10046")
}
webPort 10007
cordapps = [
"$project.group:cordapp-contracts-states:$project.version",
"$project.group:cordapp:$project.version",
"$corda_release_group:corda-finance:$corda_release_version"
]
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=PartyB,L=New York,C=US"
p2pPort 10008
rpcSettings {
address("localhost:10009")
adminAddress("localhost:10049")
}
webPort 10010
cordapps = [
"$project.group:cordapp-contracts-states:$project.version",
"$project.group:cordapp:$project.version",
"$corda_release_group:corda-finance:$corda_release_version"
]
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=Oracle,L=New York,C=US"
p2pPort 10011
rpcSettings {
address("localhost:10012")
adminAddress("localhost:10052")
}
webPort 10013
//The below cordapps will be deployed to oracle.
//Create below packages named base and service and add to dependency
cordapps = [
"$project.group:cordapp-contracts-states:$project.version",
"net.corda.examples.oracle:base:1.0",
"net.corda.examples.oracle:service:1.0"
]
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
}
task runTemplateClient(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'com.template.TemplateClient'
args 'localhost:10006'
}
When defining your oracle node in deployNodes, you have provided the following cordapps block:
cordapps = [
"$project.group:cordapp-contracts-states:$project.version",
"net.corda.examples.oracle:base:1.0",
"net.corda.examples.oracle:service:1.0"
]
However, your project's group, as given in your project's gradle.properties file, is com.template. Therefore you need to specify your CorDapps as follows:
cordapps = [
"$project.group:cordapp-contracts-states:$project.version",
"com.template:base:0.1",
"com.template:service:0.1"
]
Alternatively, you can use the following shorthand:
cordapps = [
"$project.group:cordapp-contracts-states:$project.version",
"$project.group:base:0.1",
"$project.group:service:0.1"
]
I created a service-builder and add it to my springmvc-portlet. After deployment, my service-builder was unable to start correctly.
Log:
18:26:10,309 WARN [fileinstall-C:/Users/administrator/Projects/Portal/liferay-ce-portal-7.0-ga4/osgi/modules][org_apache_felix_fileinstall:103] Error while starting bundle: file:/C:/Users/administrator/Projects/Portal/liferay-ce-portal-7.0-ga4/osgi/modules/vp.data.access.service.jar
org.osgi.framework.BundleException: Could not resolve module: vp.data.access.service [563]_ Unresolved requirement: Import-Package: com.vt.data.access.exception_ [Sanitized]
at org.eclipse.osgi.container.Module.start(Module.java:429)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)
springmvc-portlet build.gradle
buildscript {
repositories {
maven {
url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
}
}
dependencies {
classpath group: "com.liferay", name: "com.liferay.gradle.plugins.css.builder", version: "2.0.0"
}
}
apply plugin: "com.liferay.css.builder"
dependencies {
compile group: "org.springframework", name: "spring-webmvc-portlet", version: "4.1.9.RELEASE"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"
compile project(":modules:vp-data-access:vp-data-access-api")
}
service build.gradle
dependencies {
compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
compileOnly group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
compile project(":modules:vp-data-access:vp-data-access-api")
}
buildService {
apiDir = "../vp-data-access-api/src/main/java"
}
group = "vp.data.access"
Can anybody help me to solve my problem?
I have configured Firebase Crash Reporting. The log is showing that the initialization is successful, but when I send report exception by invoking test exception:
FirebaseCrash.report(new Exception("Oppss!!!"));
I get this exception:
E/FirebaseCrash: Error sending crash report
bmk: Server did not receive report: Origin Error message: The caller does not have permission
my build.gradle is
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
apply plugin: 'com.google.firebase.firebase-crash'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
repositories {
mavenCentral()
}
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
applicationId "My_APP_ID"
minSdkVersion 17
targetSdkVersion 23
versionCode 8
versionName "2.4"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
testCompile 'org.json:json:20140107'
androidTestCompile 'com.android.support:support-annotations:24.0.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator- 18:2.1.2'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'me.relex:circleindicator:1.1.5#aar'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.jakewharton:butterknife:8.2.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.github.satyan:sugar:1.4'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.firebase:firebase-crash:10.2.0'
compile 'com.pixplicity.easyprefs:library:1.8.1#aar'
compile 'com.google.android.gms:play-services-tagmanager:10.2.0'
}
apply plugin: 'com.google.gms.google-services'
google-services.json content is:
{
"project_info": {
"project_number": "216634835644",
"firebase_url": "https://my_firebase_url.firebaseio.com",
"project_id": "project_id",
"storage_bucket": "project_id.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:216634835644:android:ac839bfe454896ad",
"android_client_info": {
"package_name": "my package name"
}
},
"oauth_client": [
{
"client_id": "my_client_id",
"client_type": 3
}
],
"api_key": [
{
"current_key": "My_api_key"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
This is my build.gradle like this:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'
buildscript {
ext.kotlin_version = '1.0.0'
ext.anko_version = '0.8.2'
ext.okhttp_version = '2.4.0'
ext.butterknife_version = '7.0.1'
ext.realm_version = '0.88.0-SNAPSHOT'
repositories {
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap/' }
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath "io.realm:realm-gradle-plugin:$realm_version"
}
}
repositories {
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap/' }
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
kapt {
generateStubs = true
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "cn.com.xxxx.xxxxx"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
incremental false
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
sourceSets {
main.java.srcDirs += 'src/main/java'
}
}
//configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }
dependencies {
compile 'com.android.support:multidex:1.0.1'
androidTestCompile 'com.android.support:multidex-instrumentation:1.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
// testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'de.hdodenhof:circleimageview:1.2.2'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.anko:anko-sdk15:$anko_version"
compile "org.jetbrains.anko:anko-support-v4:$anko_version"
compile "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
compile "org.jetbrains.anko:anko-design:$anko_version"
compile "org.jetbrains.anko:anko-recyclerview-v7:$anko_version"
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'de.greenrobot:eventbus:2.4.0'
compile "com.squareup.okhttp:okhttp:$okhttp_version"
compile "com.squareup.okhttp:okhttp-urlconnection:$okhttp_version"
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.5.0'
compile("io.realm:realm-android:$realm_version"){
exclude group: 'com.android.support', module: 'multidex'
}
compile "org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"
compile 'com.github.KeepSafe:ReLinker:1.1'
compile 'com.github.jjobes:slideDateTimePicker:1.0.2'
kapt "io.realm:realm-android:$realm_version"
}
but When I run my project following error occure :
Error:Gradle: Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: io/realm/annotations/Ignore.class
I tried this solution and some of questions in StackOverflow like this, but cannot solve it.
With 0.88 you no longer have to configure Realm yourself to work with Kotlin. That is all done inside the plugin. So you should remove kapt "io.realm:realm-android:$realm_version
We have a working example with Kotlin here:
https://github.com/realm/realm-java/blob/master/examples/kotlinExample/build.gradle
https://github.com/realm/realm-java/blob/master/examples/build.gradle