Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[Release] Added missing Apache license #1753

Merged
merged 1 commit into from
Nov 14, 2018
Merged
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
19 changes: 19 additions & 0 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
Expand Down
19 changes: 19 additions & 0 deletions android/sdk/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
Expand Down
21 changes: 20 additions & 1 deletion android/sdk/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/ouy/Library/AndroidStudio/sdk/tools/proguard/proguard-android.txt
Expand All @@ -19,4 +38,4 @@
-keep class com.taobao.weex.layout.** { *; }
-keep class com.taobao.weex.WXSDKEngine { *; }
-keep class com.taobao.weex.base.SystemMessageHandler { *; }
-dontwarn com.taobao.weex.bridge.**
-dontwarn com.taobao.weex.bridge.**
21 changes: 20 additions & 1 deletion android/sdk/publish.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
#!/usr/bin/env bash
./gradlew clean assemble publish

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

./gradlew clean assemble publish
18 changes: 18 additions & 0 deletions weex_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
cmake_minimum_required(VERSION 3.4.1)
project(WeexCore)
add_subdirectory(Source)
18 changes: 18 additions & 0 deletions weex_core/Source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
cmake_minimum_required(VERSION 3.4.1)
set(WEEXCORE_LIBRARY_NAME weexcore)

Expand Down
19 changes: 19 additions & 0 deletions weex_core/Source/IPC/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

cmake_minimum_required(VERSION 3.4.1)

set(IPC_LIBRARY_NAME weexipc)
Expand Down
37 changes: 26 additions & 11 deletions weex_core/Source/core/data_render/class_factory.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
//
// Created by chad on 2018/7/19.
//
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

#include "core/data_render/class_factory.h"
#include "core/data_render/class.h"
Expand All @@ -22,7 +37,7 @@ Value ClassFactory::CreateClassDescriptor(ClassDescriptor *p_super) {
descs_.push_back(desc);
return value;
}

Value ClassFactory::CreateArray() {
Array *array = new Array();
Value value;
Expand All @@ -31,7 +46,7 @@ Value ClassFactory::CreateArray() {
arrays_.push_back(array);
return value;
}

Value ClassFactory::CreateTable() {
Table *table = new Table();
Value value;
Expand All @@ -40,7 +55,7 @@ Value ClassFactory::CreateTable() {
tables_.push_back(table);
return value;
}

Value ClassFactory::ClassString() {
ClassDescriptor *desc = NewClassString();
Value value;
Expand All @@ -49,7 +64,7 @@ Value ClassFactory::ClassString() {
descs_.push_back(desc);
return value;
}

Value ClassFactory::ClassJSON() {
ClassDescriptor *desc = NewClassJSON();
Value value;
Expand All @@ -58,7 +73,7 @@ Value ClassFactory::ClassJSON() {
descs_.push_back(desc);
return value;
}

Value ClassFactory::ClassArray() {
ClassDescriptor *desc = NewClassArray();
Value value;
Expand All @@ -67,7 +82,7 @@ Value ClassFactory::ClassArray() {
descs_.push_back(desc);
return value;
}

Value ClassFactory::ClassObject() {
ClassDescriptor *desc = NewClassOject();
Value value;
Expand All @@ -76,7 +91,7 @@ Value ClassFactory::ClassObject() {
descs_.push_back(desc);
return value;
}

int ClassFactory::findDesc(const ClassDescriptor *desc) {
int index = 0;
for (auto d : descs_) {
Expand All @@ -98,7 +113,7 @@ ClassInstance *ClassFactory::CreateClassInstanceFromSuper(ClassDescriptor *p_des
}
return inst;
}

Value ClassFactory::CreateClassInstance(ClassDescriptor *p_desc) {
ClassInstance *inst = CreateClassInstanceFromSuper(p_desc);
Value value;
Expand Down
27 changes: 23 additions & 4 deletions weex_core/Source/core/data_render/tokenizer.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

#include "core/data_render/tokenizer.h"
#include "core/data_render/token.h"
#include "core/data_render/scanner.h"
Expand All @@ -16,12 +35,12 @@ namespace data_render {

// TokenizerState implementation
// -------------------------------

#ifdef __ANDROID__
#undef EOF
static const char EOF = -1;
#endif

class TokenizerState {
public:
static std::unordered_map<std::string, Token::Type> keywords;
Expand Down Expand Up @@ -578,7 +597,7 @@ Token Tokenizer::ParseString(char delim) {
}

Token::Type type = delim == '`' ? Token::TEMPLATE : Token::STRING;

if (utf8) {
buffer = utf8_decode(buffer);
}
Expand Down Expand Up @@ -680,5 +699,5 @@ Token Tokenizer::ParseNumber(char start) {

}
}
}
}

19 changes: 19 additions & 0 deletions weex_core/Source/third_party/json11/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

cmake_minimum_required(VERSION 3.4.1)

set(JSON11_LIBRARY_NAME json11)
Expand Down
18 changes: 18 additions & 0 deletions weex_core/Source/weexjsc_version_script.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
{
global: *Inject_GCanvasFunc*; Java_com*; JNI_OnLoad; JNI_OnUnload;
local: *;
Expand Down
19 changes: 19 additions & 0 deletions weex_core/Source/wson/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

cmake_minimum_required(VERSION 3.4.1)

set(WSON_LIBRARY_NAME wson)
Expand Down