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"
]
Related
I'm trying to write to my firebase Realtime database but I cannot figure why I cant. I'm just starting to implement it but I cant figure out why my .setValue()in my onCreate is not working. I've brought in my google-servies doc and i've followed the code in the tutorial in android studio but still no luck. I also dont think its an error with dependences but it still could be for all i know. I'm not getting any errors so im really at a lost. Has anybody any suggestions. Here is the relevant code:
class CreateAPostFragment : Fragment() {
var post = PostModel()
val database = FirebaseDatabase.getInstance("HERE IS MY URL TO THE DATABASE")
val myRef = database.getReference("test")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
myRef.setValue("Hello World")
println("added")
println(myRef)
}
Build.gradle(Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.32"
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle(module)
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id "kotlin-kapt"
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "ie.wit.savvytutor"
minSdkVersion 29
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
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'
}
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:29.0.4')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation('com.google.firebase:firebase-database-ktx')
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.0.0'
//noinspection GradleCompatible
implementation 'com.android.support:design:26.1.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation "androidx.drawerlayout:drawerlayout:1.1.1"
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
apply plugin: 'com.google.gms.google-services'
androidTestImplementation("com.android.support.test.espresso:espresso-contrib:2.2.2") {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-v7'
exclude group: 'com.android.support', module: 'design'
exclude module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
}
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.
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 = '/'
}
This question already has answers here:
Failed to resolve: com.google.firebase:firebase-core:11.2.0
(6 answers)
Closed 5 years ago.
I recently updated Android studio from 2.1 to 2.3.3 on Ubuntu 17.04. Additionally, I had to update my android.support dependencies from version 25.0.0 to 26.0.1 and my firebase dependencies from 9.6.1 to 11.2.0. I have tried everything on SO to no avail, including completely re-imaging ubuntu. All google/firebase dependencies still fail to resolve so It must be an error on my side. Below are my gradle files.
Module build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "me.myapp.app"
minSdkVersion 15
targetSdkVersion 26
versionCode 10
versionName "0.10.1"
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.google.firebase:firebase-core:11.2.0'
compile 'com.google.firebase:firebase-database:11.2.0'
compile 'com.google.firebase:firebase-auth:11.2.0'
compile 'com.google.firebase:firebase-crash:11.2.0'
compile 'com.google.firebase:firebase-storage:11.2.0'
compile 'com.google.firebase:firebase-messaging:11.2.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
}
apply plugin: 'com.google.gms.google-services'
Project build.gradle
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
try to add
maven {
url "https://maven.google.com"
}
after jcenter() like below
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
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