Skip to content

Commit

Permalink
#20: Switch to Apache 2.0 license
Browse files Browse the repository at this point in the history
  • Loading branch information
eparovyshnaya committed Jun 10, 2020
1 parent 2b2792f commit b1b0fe6
Show file tree
Hide file tree
Showing 66 changed files with 1,322 additions and 584 deletions.
478 changes: 201 additions & 277 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Hits-of-Code](https://hitsofcode.com/github/arsysop/liho)](https://hitsofcode.com/view/github/arsysop/liho)
[![codecov](https://codecov.io/gh/arsysop/liho/branch/master/graph/badge.svg)](https://codecov.io/gh/arsysop/liho)

[![EPL-2.0 License](https://img.shields.io/badge/License-EPL--2.0-brightgreen.svg)](https://github.com/arsysop/liho/blob/master/LICENSE)
[![](https://img.shields.io/badge/License-Apacke--2.0-brightgreen.svg)](https://github.com/arsysop/liho/blob/master/LICENSE)

LiHo ia a configurable and pluggale **li**cense **h**eader validation t**o**ol.
It checks each file of your project sourcebase and reports whether it has valid *copyright header* or not.
Expand Down
67 changes: 41 additions & 26 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
/********************************************************************************
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
* 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
*
* SPDX-License-Identifier: EPL-2.0
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
********************************************************************************/

* ArSysOp - initial API and implementation
*******************************************************************************/
plugins {
java
jacoco
`maven-publish`
// id("ru.arsysop.liho.liho-gradle-plugin") version "0.1"
}

group = "ru.arsysop"
group = "ru.arsysop.liho"
version = "0.1"

project.apply {
Expand Down Expand Up @@ -47,6 +55,12 @@ java {
withSourcesJar()
}

/*liho {
root.set(project.file("src/main"))
strict.set(true)
report.set(project.file("$buildDir/liho/report.txt"))
}*/

tasks.withType(Test::class) {
useJUnitPlatform()
finalizedBy("jacocoTestReport")
Expand All @@ -71,29 +85,30 @@ tasks.jar {

fun extendManifest(mf: Manifest): Unit {
mf.attributes(
"group" to project.group,
"artifact" to project.name,
"version" to project.version,
"vendor" to "ArSysOp"
"Group" to project.group,
"Artifact" to project.name,
"Version" to project.version,
"Bundle-Vendor" to "ArSysOp",
"Bundle-Name" to "ru.arsysop.liho",
"Bundle-SymbolicName" to "ru.arsysop.liho",
"Bundle-Version" to project.version,
"Automatic-Module-Name" to "ru.arsysop.liho",
"Bundle-ManifestVersion" to "2",
"Bundle-RequiredExecutionEnvironment" to "JavaSE-1.8",
"Export-Package" to
listOf("ru.arsysop.liho.report", "ru.arsysop.liho.bulk")
.map { it + ";version=${project.version}" }
.joinToString(", ")
)
}

publishing {
/*repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/arsysop/liho")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
}*/
publications {
repositories {
maven {
url = uri("$buildDir/repos")
}
/*maven {
url = uri("$buildDir/local-repo")
}*/
mavenLocal()
}
register<MavenPublication>("gpr") {
from(components["java"])
Expand Down
40 changes: 33 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
/********************************************************************************
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
* 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
*
* SPDX-License-Identifier: EPL-2.0
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
********************************************************************************/
* ArSysOp - initial API and implementation
*******************************************************************************/
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
jcenter()
maven(url = "https://dl.bintray.com/arsysop/lang")
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "ru.arsysop.liho" &&
requested.id.name == "liho-gradle-plugin"
) {
useModule("ru.arsysop.liho:liho-gradle-plugin:${requested.version}")
}
}
}
}

rootProject.name = "liho"
20 changes: 20 additions & 0 deletions src/main/java/ru/arsysop/liho/bulk/AnalyzedTree.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package ru.arsysop.liho.bulk;

import ru.arsysop.liho.bulk.issues.AnalysisFailed;
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/ru/arsysop/liho/bulk/CommentTypes.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package ru.arsysop.liho.bulk;

import ru.arsysop.liho.content.comment.CommentType;
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/ru/arsysop/liho/bulk/ContentAnalysisFactory.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package ru.arsysop.liho.bulk;

import ru.arsysop.liho.content.analysis.ContentAnalysis;
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/ru/arsysop/liho/bulk/Visitor.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package ru.arsysop.liho.bulk;

import ru.arsysop.liho.bulk.issues.AnalysisFailed;
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/ru/arsysop/liho/bulk/issues/AnalysisFailed.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package ru.arsysop.liho.bulk.issues;

import ru.arsysop.liho.report.IssueType;
Expand Down
23 changes: 16 additions & 7 deletions src/main/java/ru/arsysop/liho/config/Config.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
/********************************************************************************
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
* 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
*
* SPDX-License-Identifier: EPL-2.0
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
********************************************************************************/
* ArSysOp - initial API and implementation
*******************************************************************************/

package ru.arsysop.liho.config;

public final class Config {
Expand Down
22 changes: 15 additions & 7 deletions src/main/java/ru/arsysop/liho/content/Content.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
/********************************************************************************
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
* 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
*
* SPDX-License-Identifier: EPL-2.0
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
********************************************************************************/
* ArSysOp - initial API and implementation
*******************************************************************************/
package ru.arsysop.liho.content;

import ru.arsysop.liho.file.File;
Expand Down
22 changes: 15 additions & 7 deletions src/main/java/ru/arsysop/liho/content/ContentLine.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
/********************************************************************************
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
* 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
*
* SPDX-License-Identifier: EPL-2.0
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
********************************************************************************/
* ArSysOp - initial API and implementation
*******************************************************************************/
package ru.arsysop.liho.content;

import java.util.Objects;
Expand Down
Loading

0 comments on commit b1b0fe6

Please sign in to comment.