From 8a130465fd9f1b693ebf09f59787205bff288c47 Mon Sep 17 00:00:00 2001
From: "elena.parovyshnaya" <elena.parovyshnaya@gmail.com>
Date: Fri, 12 Jun 2020 10:17:36 +0300
Subject: [PATCH 1/3] #20: Switch to Apache 2.0 license

 - fix publishing settings / pom.xml
---
 build.gradle.kts                              | 20 ++++++++++++-------
 .../java/ru/arsysop/liho/bulk/Visitor.java    |  2 +-
 src/todo.md                                   | 16 ---------------
 3 files changed, 14 insertions(+), 24 deletions(-)
 delete mode 100644 src/todo.md

diff --git a/build.gradle.kts b/build.gradle.kts
index 5074822..848686f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -22,7 +22,7 @@ plugins {
     java
     jacoco
     `maven-publish`
-     //id("ru.arsysop.liho.liho-gradle-plugin") version "0.1"
+    //("ru.arsysop.liho.liho-gradle-plugin") version "0.1"
 }
 
 group = "ru.arsysop.liho"
@@ -35,7 +35,6 @@ project.apply {
 
 repositories {
     mavenCentral()
-    mavenLocal()
     jcenter()
     maven(url = "https://dl.bintray.com/arsysop/lang")
 }
@@ -55,11 +54,13 @@ java {
     withSourcesJar()
 }
 
-/*liho {
+/*
+liho {
     root.set(project.file("src/main"))
     strict.set(true)
     report.set(project.file("$buildDir/liho/report.txt"))
-}*/
+}
+*/
 
 tasks.withType(Test::class) {
     useJUnitPlatform()
@@ -79,8 +80,13 @@ tasks.jacocoTestReport {
     }
 }
 
-tasks.jar {
+tasks.withType(Jar::class) {
     extendManifest(manifest)
+    from("README.md", "LICENSE")
+}
+
+tasks.getByName("sourcesJar") {
+    (this as Jar).from(sourceSets["test"].allSource)
 }
 
 fun extendManifest(mf: Manifest) {
@@ -117,8 +123,8 @@ publishing {
                 url.set("https://github.com/ArSysOp/liho")
                 licenses {
                     license {
-                        name.set("Eclipse Public License 2.0")
-                        url.set("https://spdx.org/licenses/EPL-2.0.html")
+                        name.set("Apache 2.0")
+                        url.set("http://www.apache.org/licenses/LICENSE-2.0")
                     }
                 }
                 developers {
diff --git a/src/main/java/ru/arsysop/liho/bulk/Visitor.java b/src/main/java/ru/arsysop/liho/bulk/Visitor.java
index e699aaa..05675ad 100644
--- a/src/main/java/ru/arsysop/liho/bulk/Visitor.java
+++ b/src/main/java/ru/arsysop/liho/bulk/Visitor.java
@@ -34,7 +34,7 @@
 import java.nio.file.attribute.BasicFileAttributes;
 
 final class Visitor implements FileVisitor<Path> {
-
+                                    
 	private final CommentTypes types;
 	private final ContentAnalysisFactory analyzers;
 	private final Report report;
diff --git a/src/todo.md b/src/todo.md
deleted file mode 100644
index f3b722b..0000000
--- a/src/todo.md
+++ /dev/null
@@ -1,16 +0,0 @@
-- package-info.java
-- *.java
-- *.xml
-- *.properties
-
-report
- - plug reporter
- - implement eclipse: problem view reporter
- 
-
-
-config
- - ignore extensions
- - ignore templates
- - configure keywords
- - configure format

From 75728bc96704ea156cab23d1132452beac29a263 Mon Sep 17 00:00:00 2001
From: "elena.parovyshnaya" <elena.parovyshnaya@gmail.com>
Date: Fri, 12 Jun 2020 10:26:44 +0300
Subject: [PATCH 2/3] #20: Switch to Apache 2.0 license  - fill artifacts'
 manifests accurately

---
 build.gradle.kts    | 17 +++++++++++++----
 settings.gradle.kts |  1 +
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index 848686f..d9174e4 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -80,8 +80,12 @@ tasks.jacocoTestReport {
     }
 }
 
-tasks.withType(Jar::class) {
+tasks.jar {
     extendManifest(manifest)
+}
+
+tasks.withType(Jar::class) {
+    extendManifestShort(manifest)
     from("README.md", "LICENSE")
 }
 
@@ -91,9 +95,6 @@ tasks.getByName("sourcesJar") {
 
 fun extendManifest(mf: Manifest) {
     mf.attributes(
-        "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",
@@ -108,6 +109,14 @@ fun extendManifest(mf: Manifest) {
     )
 }
 
+fun extendManifestShort(mf: Manifest) {
+    mf.attributes(
+        "Group" to project.group,
+        "Artifact" to project.name,
+        "Version" to project.version
+    )
+}
+
 publishing {
     publications {
         repositories {
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 920ce01..2669776 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -24,6 +24,7 @@ pluginManagement {
         mavenLocal()
         jcenter()
         maven(url = "https://dl.bintray.com/arsysop/lang")
+        maven(url = "https://dl.bintray.com/arsysop/liho")
     }
     resolutionStrategy {
         eachPlugin {

From 746c3a138a47738ebc581024cf2ca52c7007cc6b Mon Sep 17 00:00:00 2001
From: "elena.parovyshnaya" <elena.parovyshnaya@gmail.com>
Date: Fri, 12 Jun 2020 10:29:06 +0300
Subject: [PATCH 3/3] #20: Switch to Apache 2.0 license  - restore correct
 plugin ref notation

---
 build.gradle.kts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index d9174e4..af43837 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -22,7 +22,7 @@ plugins {
     java
     jacoco
     `maven-publish`
-    //("ru.arsysop.liho.liho-gradle-plugin") version "0.1"
+    //id("ru.arsysop.liho.liho-gradle-plugin") version "0.1"
 }
 
 group = "ru.arsysop.liho"