Add Android.bp file language for Soong (#5361)

* Add grammar for Android.bp files.

* Add Android.bp language for Soong build.

Co-authored-by: Colin Seymour <colin@github.com>
This commit is contained in:
Andrew Walbran 2021-05-14 10:19:36 +01:00 коммит произвёл GitHub
Родитель bf21354138
Коммит ff3246b838
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 115 добавлений и 0 удалений

3
.gitmodules поставляемый
Просмотреть файл

@ -221,6 +221,9 @@
[submodule "vendor/grammars/ampl"]
path = vendor/grammars/ampl
url = https://github.com/ampl/sublime-ampl
[submodule "vendor/grammars/android-system-tools"]
path = vendor/grammars/android-system-tools
url = https://github.com/flimberger/android-system-tools
[submodule "vendor/grammars/ant.tmbundle"]
path = vendor/grammars/ant.tmbundle
url = https://github.com/textmate/ant.tmbundle

Просмотреть файл

@ -177,6 +177,8 @@ vendor/grammars/aidl-language:
- source.aidl
vendor/grammars/ampl:
- source.ampl
vendor/grammars/android-system-tools:
- source.bp
vendor/grammars/ant.tmbundle:
- text.xml.ant
vendor/grammars/antlr.tmbundle:

Просмотреть файл

@ -5522,6 +5522,13 @@ Solidity:
extensions:
- ".sol"
language_id: 237469032
Soong:
type: data
tm_scope: source.bp
ace_mode: text
filenames:
- Android.bp
language_id: 222900098
SourcePawn:
type: programming
color: "#f69e1d"

Просмотреть файл

@ -0,0 +1,70 @@
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed 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.
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
java_plugin {
name: "java_api_finder",
static_libs: [
"java_api_used_by_mainline_module",
],
}
java_library_host {
name: "java_api_used_by_mainline_module",
srcs: ["src/main/**/*.java"],
static_libs: [
"//external/error_prone:error_prone_core",
],
libs: [
"//external/auto:auto_service_annotations",
],
plugins: [
"//external/auto:auto_service_plugin",
],
javacflags: ["-verbose"],
}
java_test_host {
name: "JavaApiUsedByMainlineModuleTest",
srcs: ["src/test/**/JavaApiUsedByMainlineModuleTest.java"],
java_resource_dirs: ["src/test/res"],
java_resources: [":java_api_used_by_mainline_module_testdata"],
static_libs: [
"java_api_used_by_mainline_module",
"error_prone_test_helpers",
"hamcrest-library",
"hamcrest",
"platform-test-annotations",
"junit",
"truth-prebuilt",
],
test_options: {
unit_test: true,
},
}
filegroup {
name: "java_api_used_by_mainline_module_testdata",
path: "src/test/res",
srcs: ["src/test/res/**/*.java"],
}

1
vendor/README.md поставляемый
Просмотреть файл

@ -429,6 +429,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **Smalltalk:** [tomas-stefano/smalltalk-tmbundle](https://github.com/tomas-stefano/smalltalk-tmbundle)
- **Smarty:** [textmate/php-smarty.tmbundle](https://github.com/textmate/php-smarty.tmbundle)
- **Solidity:** [davidhq/SublimeEthereum](https://github.com/davidhq/SublimeEthereum)
- **Soong:** [flimberger/android-system-tools](https://github.com/flimberger/android-system-tools)
- **SourcePawn:** [Dreae/sourcepawn-vscode](https://github.com/Dreae/sourcepawn-vscode)
- **Spline Font Database:** [Alhadis/language-fontforge](https://github.com/Alhadis/language-fontforge)
- **Squirrel:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle)

1
vendor/grammars/android-system-tools поставляемый Submodule

@ -0,0 +1 @@
Subproject commit 307f6c9c0b0b305d6cf72480a37a72d0f86077f1

31
vendor/licenses/git_submodule/android-system-tools.dep.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,31 @@
---
name: android-system-tools
version: 307f6c9c0b0b305d6cf72480a37a72d0f86077f1
type: git_submodule
homepage: https://github.com/flimberger/android-system-tools
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License (MIT)
Copyright (c) 2019 Florian Limberger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []