Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.code.gson:gson:2.3.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void handler(String data, CallBackFunction function) {

webView.callHandler("functionInJs", new Gson().toJson(user), new CallBackFunction() {
@Override
public void onCallBack(String data) {
public void onCallBack(Object data) {

}
});
Expand Down Expand Up @@ -123,7 +123,7 @@ public void onClick(View v) {
webView.callHandler("functionInJs", "data from Java", new CallBackFunction() {

@Override
public void onCallBack(String data) {
public void onCallBack(Object data) {
// TODO Auto-generated method stub
Log.i(TAG, "reponse data from js " + data);
}
Expand Down
29 changes: 6 additions & 23 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,11 @@ android {
}
}

dependencies {
}

def siteUrl = 'https://github.com/lzyzsd/JsBridge'
def gitUrl = 'https://github.com/lzyzsd/JsBridge.git'
apply plugin: 'com.github.dcendents.android-maven'
group = "com.github.lzyzsd.jsbridge"
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.code.gson:gson:2.8.0'
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
repositories {
mavenCentral()
}
Loading