Skip to content

Commit 9261b29

Browse files
authored
ci(release-audit): add license header and dependency checker (apache#1687)
* ci(release-audit): add license header and dependency checker * chore: add Apache license headers * chore: add new line to .ratignore
1 parent 90e74be commit 9261b29

File tree

16 files changed

+345
-8
lines changed

16 files changed

+345
-8
lines changed

.github/workflows/release-audit.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Release Auditing
19+
20+
on: [push, pull_request]
21+
22+
jobs:
23+
test:
24+
name: Audit Licenses
25+
runs-on: ubuntu-latest
26+
steps:
27+
# Checkout project
28+
- uses: actions/checkout@v4
29+
30+
# Check license headers
31+
- uses: erisu/apache-rat-action@555ae80334a535eb6c1f8920b121563a5a985a75
32+
33+
# Setup environment with node
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
38+
# Install node packages
39+
- name: npm install packages
40+
run: npm i
41+
42+
# Check node package licenses
43+
- uses: erisu/license-checker-action@e929758f9416f30234ac454fc9054ca4b803871d
44+
with:
45+
license-config: 'licence_checker.yml'

.ratignore

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
*.properties
2-
templates
3-
gen
4-
proguard-project.txt
5-
spec
6-
framework/build
7-
ic_launcher.png
8-
build
1+
\.(.*)
2+
(.*).txt
3+
coverage
4+
fixtures
5+
generated
6+
gitignore
7+
intermediates
8+
reports
9+
test-results
10+
node_modules

framework/gradle.properties

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
# Project-wide Gradle settings.
219

320
# IDE (e.g. Android Studio) users:

framework/gradle/wrapper/gradle-wrapper.properties

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
#Thu Nov 09 10:50:25 PST 2017
219
distributionBase=GRADLE_USER_HOME
320
distributionPath=wrapper/dists

framework/project.properties

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
# GENERATED FILE! DO NOT EDIT!
219

320
# This file was originally created by the Android Tools, but is now

licence_checker.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Compiled list of allowed 3RD PARTY LICENSES from:
19+
#
20+
# ASF CATEGORY A: WHAT CAN WE INCLUDE IN AN ASF PROJECT
21+
# https://www.apache.org/legal/resolved.html#category-a
22+
#
23+
# Licenses converted into the SPDX standardized short identifier format.
24+
# https://spdx.org/licenses/
25+
allowed-licenses:
26+
- 0BSD
27+
- AFL-3.0
28+
- Apache-1.1
29+
- Apache-2.0
30+
- APAFML
31+
- BlueOak-1.0.0
32+
- BSD-2-Clause
33+
- BSD-3-Clause
34+
- BSD-3-Clause-LBNL
35+
- BSL-1.0
36+
- CC-PDDC
37+
- CC0-1.0
38+
- EPICS
39+
- HPND
40+
- ICU
41+
- ISC
42+
- MIT
43+
- MIT-0
44+
- MS-PL
45+
- MulanPSL-2.0
46+
- NCSA
47+
- OGL-UK-3.0
48+
- PHP-3.01
49+
- PostgreSQL
50+
- PSF-2.0
51+
- SMLNJ
52+
- Unicode-DFS-2016
53+
- Unlicense
54+
- UPL-1.0
55+
- W3C
56+
- WTFPL
57+
- X11
58+
- Xnet
59+
- Zlib
60+
- ZPL-2.0

spec/fixtures/android_studio_project/gradle/wrapper/gradle-wrapper.properties

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
#Mon Dec 28 10:00:20 PST 2015
219
distributionBase=GRADLE_USER_HOME
320
distributionPath=wrapper/dists

templates/project/project.properties

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
119
# This file was originally created by the Android Tools, but is now
220
# used by cordova-android to manage the state of the various third party
321
# libraries used in your application

templates/project/res/mipmap-hdpi-v26/ic_launcher.xml

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
220
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
321
<background android:drawable="@mipmap/ic_launcher_background" />
422
<foreground android:drawable="@mipmap/ic_launcher_foreground" />

templates/project/res/mipmap-ldpi-v26/ic_launcher.xml

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
220
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
321
<background android:drawable="@mipmap/ic_launcher_background" />
422
<foreground android:drawable="@mipmap/ic_launcher_foreground" />

templates/project/res/mipmap-mdpi-v26/ic_launcher.xml

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
220
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
321
<background android:drawable="@mipmap/ic_launcher_background" />
422
<foreground android:drawable="@mipmap/ic_launcher_foreground" />

templates/project/res/mipmap-xhdpi-v26/ic_launcher.xml

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
220
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
321
<background android:drawable="@mipmap/ic_launcher_background" />
422
<foreground android:drawable="@mipmap/ic_launcher_foreground" />

templates/project/res/mipmap-xxhdpi-v26/ic_launcher.xml

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
220
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
321
<background android:drawable="@mipmap/ic_launcher_background" />
422
<foreground android:drawable="@mipmap/ic_launcher_foreground" />

templates/project/res/mipmap-xxxhdpi-v26/ic_launcher.xml

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
220
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
321
<background android:drawable="@mipmap/ic_launcher_background" />
422
<foreground android:drawable="@mipmap/ic_launcher_foreground" />

templates/project/wrapper.gradle

+19
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
//This file is intentionally just a comment

0 commit comments

Comments
 (0)