Skip to content

Commit 3911c95

Browse files
committed
m:修复publish.gradle中的错误,初步完成gcanvas_library的上传
1 parent b6af2c4 commit 3911c95

File tree

16 files changed

+28
-46
lines changed

16 files changed

+28
-46
lines changed
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

android/adapters/bridge_adapter/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ dependencies {
4848
project.ext.id = rootProject.extensions.artifacts.ImageAdapter
4949
project.ext.meta.labels = ['Weex', 'ReactNative', 'GPU', 'OpenGL', 'GCanvas', "canvas", 'Adapter']
5050
project.ext.meta.description = 'This package defines how to load images into bitmaps in GCanvas project.'
51-
//apply from: "${rootProject.projectDir}/publish.gradle"
51+
apply from: "${rootProject.projectDir}/publish.gradle"

android/adapters/gcanvas_imageloader_fresco/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ dependencies {
3939
project.ext.id = rootProject.extensions.artifacts.FrescoAdapter
4040
project.ext.meta.labels = ['Weex', 'ReactNative', 'GPU', 'OpenGL', 'GCanvas', "canvas", 'Fresco', 'Image Loader']
4141
project.ext.meta.description = 'This package is the Fresco implemation of GCanvas image adapter.'
42-
//apply from: "${rootProject.projectDir}/publish.gradle"
42+
apply from: "${rootProject.projectDir}/publish.gradle"

android/adapters/gcanvas_imageloader_picasso/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ dependencies {
3636
project.ext.id = rootProject.extensions.artifacts.PicassoAdapter
3737
project.ext.meta.labels = ['Weex', 'ReactNative', 'GPU', 'OpenGL', 'GCanvas', "canvas", 'Picasso', 'Image Loader']
3838
project.ext.meta.description = 'This package is the Picasso implemation of GCanvas image adapter.'
39-
//apply from: "${rootProject.projectDir}/publish.gradle"
39+
apply from: "${rootProject.projectDir}/publish.gradle"

android/bridge_spec/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ dependencies {
5454
project.ext.id = rootProject.extensions.artifacts.BridgeSpec
5555
project.ext.meta.labels = ['Weex', 'ReactNative', 'GPU', 'OpenGL', 'GCanvas', "canvas", 'Customize Own Bridge', 'Bridge Specification']
5656
project.ext.meta.description = 'This package defines native interfaces that a customize GCanvas bridge must implements.'
57-
//apply from: "${rootProject.projectDir}/publish.gradle"
57+
apply from: "${rootProject.projectDir}/publish.gradle"

android/gcanvas_library/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.library'
22

3-
//group = rootProject.extensions.groups.Main
4-
//version = "1.1.0"
3+
group = rootProject.extensions.groups.Main
4+
version = "1.1.0"
55

66
android {
77
compileSdkVersion rootProject.extensions.sdks.CompileSDK
@@ -67,5 +67,5 @@ dependencies {
6767
project.ext.id = rootProject.extensions.artifacts.Core
6868
project.ext.meta.labels = ['Weex', 'ReactNative', 'GPU', 'OpenGL', 'GCanvas', "canvas", 'WebGL', 'Rendering', 'High Performance']
6969
project.ext.meta.description = 'This package defines GCanvas main library.'
70-
//apply from: "${rootProject.projectDir}/publish.gradle"
70+
apply from: "${rootProject.projectDir}/publish.gradle"
7171

android/gcanvas_library/src/main/java/com/taobao/gcanvas/GCanvasJNI.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ public static void load() {
4444
}
4545

4646

47-
/**
48-
* 添加init callback
49-
*/
5047
synchronized public static void addGCanvasInitCallback(Runnable cb) {
5148
if (callbacks == null) {
5249
callbacks = new ArrayList<>();
@@ -127,9 +124,7 @@ synchronized private static void tryExecCallbacks() {
127124

128125
public static native boolean sendEvent(String contextId);
129126

130-
/**
131-
* 初始化font families
132-
*/
127+
133128
public static void setFontFamilies() {
134129
GFontConfigParser parser = new GFontConfigParser();
135130
String fallbackFont = parser.getFallbackFont();

android/gcanvas_library/src/main/java/com/taobao/gcanvas/util/GCanvasTracer.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
package com.taobao.gcanvas.util;
22

3-
/**
4-
* 供外部注入的java层 日志埋点相关接口
5-
* 支持trace()埋点 和 日志
6-
* Created by zhanqu on 2019/3/20.
7-
*/
3+
84
public abstract class GCanvasTracer {
95

106

android/gcanvas_library/src/main/java/com/taobao/gcanvas/util/GLog.java

+2-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
/**
17-
* log功能deprecated
17+
*
1818
*
1919
*/
2020
public class GLog {
@@ -38,20 +38,13 @@ public class GLog {
3838

3939
public static void bindGCanvasTracer(GCanvasTracer tracer) {
4040
sGcanvasTracerClz = tracer;
41-
// 获取tracer类名/方法名
4241
registerJavaTracer(tracer);
4342
}
4443

4544

46-
/**
47-
* 注册tracer
48-
*/
49-
private static native void registerJavaTracer(GCanvasTracer tracer);
5045

46+
private static native void registerJavaTracer(GCanvasTracer tracer);
5147

52-
/**
53-
* deprecated?
54-
*/
5548
public static void setLevel(String level) {
5649
if (level == null) {
5750
return;

bridges/weex-gcanvas/android/weex_bridge/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ dependencies {
4747
project.ext.id = rootProject.extensions.artifacts.WeexBridge
4848
project.ext.meta.labels = ['Weex', 'GPU', 'OpenGL', 'GCanvas', "canvas", 'WebGL', 'GCanvas Weex Bridge']
4949
project.ext.meta.description = 'This package defines GCanvas Weex bridge.'
50-
//apply from: "${rootProject.projectDir}/publish.gradle"
50+
apply from: "${rootProject.projectDir}/publish.gradle"

bridges/weex-gcanvas/android/weex_playground/build.gradle

+4-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ dependencies {
8888
compile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2'
8989
compile 'com.android.support:multidex:1.0.3'
9090
compile "com.taobao.android:weex_sdk:${rootProject.extensions.sdks.Weex}"
91-
compile 'com.alibaba:fastjson:1.1.54.android'
91+
92+
93+
94+
9295
compile 'com.taobao.android:weexplugin-annotation:1.3'
9396
compile 'com.taobao.android.weex_inspection:urlconnection_interceptor:1.0.0'
9497
compile 'com.taobao.android.weex_inspection:protocol:1.1.4.1'

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ rootProject.extensions.groups = [
6464
// Artifact IDs
6565
rootProject.extensions.artifacts = [
6666
'BridgeSpec' : 'spec',
67-
'Core' : 'core',
67+
'Core' : 'gcanvas_library',
6868
'WeexBridge' : 'weex',
6969
'ReactNative' : 'rn',
7070
'ImageAdapter' : 'img',

publish.gradle

+11-16
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'maven-publish'
22
apply plugin: 'com.jfrog.bintray'
33

44
project.ext.meta.vcsUrl = "https://github.com/alibaba/GCanvas.git"
5-
5+
version = project.version
66
buildscript {
77
repositories {
88
//本地库,local repository(${user.home}/.m2/repository)
@@ -73,15 +73,13 @@ def pomConfig = {
7373
}
7474

7575
publishing {
76-
println("$buildDir/outputs/aar/${project.name}-release.aar")
76+
println("$buildDir/outputs/aar/${project.name}-${version}.aar")
7777
publications {
7878
maven(MavenPublication) {
7979
groupId group
8080
artifactId project.ext.id
8181
version version
82-
artifact("$buildDir/outputs/aar/${project.name}-release.aar")
83-
artifact sourcesJar
84-
println("group id is"+groupId)
82+
println("${group}:${project.ext.id}:${version}")
8583
pom.withXml {
8684
def dependenciesNode = asNode().appendNode('dependencies')
8785

@@ -123,24 +121,21 @@ artifacts {
123121
archives androidJavadocsJar
124122
}
125123

126-
bintray {
127-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
128-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
124+
//上传到jcenter
125+
Properties properties = new Properties()
126+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
129127

130-
publications = ['maven']
128+
bintray {
129+
user = properties.getProperty("bintray.user") //读取 local.properties 文件里面的 bintray.user
130+
key = properties.getProperty("bintray.apikey") //读取 local.properties 文件里面的 bintray.apikey
131+
configurations = ['archives']
131132
pkg {
132133
repo = "GCanvas"
133134
name = "${project.group}:${project.ext.id}"
134-
userOrg = user
135+
userOrg = properties.getProperty("bintray.userOrg")
135136
licenses = ['Apache-2.0']
136137
websiteUrl = "https://g-platform.github.io"
137138
vcsUrl = project.ext.meta.vcsUrl
138139
labels = project.ext.meta.labels
139-
publicDownloadNumbers = true
140-
version {
141-
name = project.version
142-
desc = project.ext.meta.description
143-
vcsTag = project.version
144-
}
145140
}
146141
}

0 commit comments

Comments
 (0)