update gradle.

This commit is contained in:
聂秋秋 2019-11-27 20:02:09 +08:00
parent d3ba3df971
commit 5b7d914aca
9 changed files with 35 additions and 34 deletions

View File

@ -120,11 +120,12 @@ subprojects {
encoding = "UTF-8"
header = rootProject.file("license.txt")
includes(["**/*.java", "**/*.kt"])
exclude "**/test/**/*.java"
exclude "**/*Test.java"
exclude "**/TableNameParser.java"
mapping "java", "SLASHSTAR_STYLE"
mapping "kt", "SLASHSTAR_STYLE"
ignoreFailures = true
ignoreFailures = false
}
repositories {

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://downloads.gradle-dn.com/distributions/gradle-5.5.1-bin.zip
distributionUrl=https\://downloads.gradle-dn.com/distributions/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

2
gradlew vendored
View File

@ -7,7 +7,7 @@
# 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
# https://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,

2
gradlew.bat vendored
View File

@ -5,7 +5,7 @@
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -35,7 +35,7 @@ import java.util.Map;
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {
@Data
@AllArgsConstructor
private static class Dependency {
@ -43,17 +43,17 @@ class GeneratePomTest {
private String scope;
private boolean optional;
}
@Test
void test() throws IOException {
try (InputStream inputStream = new FileInputStream("build/publications/mavenJava/pom-default.xml")) {
Jerry.JerryParser jerryParser = new Jerry.JerryParser(new LagartoDOMBuilder().enableXmlMode());
Jerry doc = jerryParser.parse(FileUtil.readUTFString(inputStream));
Jerry dependencies = doc.$("dependencies dependency");
Jerry dependencies = doc.s("dependencies dependency");
Map<String, Dependency> dependenciesMap = new HashMap<>();
dependencies.forEach($this -> {
String artifactId = $this.$("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.$("scope").text(), Boolean.parseBoolean($this.$("optional").text())));
String artifactId = $this.s("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.s("scope").text(), Boolean.parseBoolean($this.s("optional").text())));
});
Dependency mp = dependenciesMap.get("mybatis-plus");
Assertions.assertEquals("compile", mp.getScope());
@ -75,5 +75,5 @@ class GeneratePomTest {
Assertions.assertFalse(bom.isOptional());
}
}
}

View File

@ -35,7 +35,7 @@ import java.util.Map;
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {
@Data
@AllArgsConstructor
private static class Dependency {
@ -43,17 +43,17 @@ class GeneratePomTest {
private String scope;
private boolean optional;
}
@Test
void test() throws IOException {
try (InputStream inputStream = new FileInputStream("build/publications/mavenJava/pom-default.xml");) {
Jerry.JerryParser jerryParser = new Jerry.JerryParser(new LagartoDOMBuilder().enableXmlMode());
Jerry doc = jerryParser.parse(FileUtil.readUTFString(inputStream));
Jerry dependencies = doc.$("dependencies dependency");
Jerry dependencies = doc.s("dependencies dependency");
Map<String, Dependency> dependenciesMap = new HashMap<>();
dependencies.forEach($this -> {
String artifactId = $this.$("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.$("scope").text(), Boolean.parseBoolean($this.$("optional").text())));
String artifactId = $this.s("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.s("scope").text(), Boolean.parseBoolean($this.s("optional").text())));
});
Dependency annotation = dependenciesMap.get("mybatis-plus-annotation");
Assertions.assertEquals("compile", annotation.getScope());
@ -69,5 +69,5 @@ class GeneratePomTest {
Assertions.assertTrue(cglib.isOptional());
}
}
}

View File

@ -35,7 +35,7 @@ import java.util.Map;
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {
@Data
@AllArgsConstructor
private static class Dependency {
@ -43,17 +43,17 @@ class GeneratePomTest {
private String scope;
private boolean optional;
}
@Test
void test() throws IOException {
try (InputStream inputStream = new FileInputStream("build/publications/mavenJava/pom-default.xml");) {
Jerry.JerryParser jerryParser = new Jerry.JerryParser(new LagartoDOMBuilder().enableXmlMode());
Jerry doc = jerryParser.parse(FileUtil.readUTFString(inputStream));
Jerry dependencies = doc.$("dependencies dependency");
Jerry dependencies = doc.s("dependencies dependency");
Map<String, Dependency> dependenciesMap = new HashMap<>();
dependencies.forEach($this -> {
String artifactId = $this.$("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.$("scope").text(), Boolean.parseBoolean($this.$("optional").text())));
String artifactId = $this.s("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.s("scope").text(), Boolean.parseBoolean($this.s("optional").text())));
});
Dependency core = dependenciesMap.get("mybatis-plus-core");
Assertions.assertEquals("compile", core.getScope());
@ -78,5 +78,5 @@ class GeneratePomTest {
Assertions.assertTrue(slf4jApi.isOptional());
}
}
}

View File

@ -35,7 +35,7 @@ import java.util.Map;
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {
@Data
@AllArgsConstructor
private static class Dependency {
@ -43,17 +43,17 @@ class GeneratePomTest {
private String scope;
private boolean optional;
}
@Test
void test() throws IOException {
try (InputStream inputStream = new FileInputStream("build/publications/mavenJava/pom-default.xml")) {
Jerry.JerryParser jerryParser = new Jerry.JerryParser(new LagartoDOMBuilder().enableXmlMode());
Jerry doc = jerryParser.parse(FileUtil.readUTFString(inputStream));
Jerry dependencies = doc.$("dependencies dependency");
Jerry dependencies = doc.s("dependencies dependency");
Map<String, Dependency> dependenciesMap = new HashMap<>();
dependencies.forEach($this -> {
String artifactId = $this.$("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.$("scope").text(), Boolean.parseBoolean($this.$("optional").text())));
String artifactId = $this.s("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.s("scope").text(), Boolean.parseBoolean($this.s("optional").text())));
});
Dependency extension = dependenciesMap.get("mybatis-plus-extension");
Assertions.assertEquals("compile", extension.getScope());
@ -69,5 +69,5 @@ class GeneratePomTest {
Assertions.assertTrue(beetl.isOptional());
}
}
}

View File

@ -35,7 +35,7 @@ import java.util.Map;
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {
@Data
@AllArgsConstructor
private static class Dependency {
@ -43,17 +43,17 @@ class GeneratePomTest {
private String scope;
private boolean optional;
}
@Test
void test() throws IOException {
try (InputStream inputStream = new FileInputStream("build/publications/mavenJava/pom-default.xml");) {
Jerry.JerryParser jerryParser = new Jerry.JerryParser(new LagartoDOMBuilder().enableXmlMode());
Jerry doc = jerryParser.parse(FileUtil.readUTFString(inputStream));
Jerry dependencies = doc.$("dependencies dependency");
Jerry dependencies = doc.s("dependencies dependency");
Map<String, Dependency> dependenciesMap = new HashMap<>();
dependencies.forEach($this -> {
String artifactId = $this.$("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.$("scope").text(), Boolean.parseBoolean($this.$("optional").text())));
String artifactId = $this.s("artifactId").text();
dependenciesMap.put(artifactId, new Dependency(artifactId, $this.s("scope").text(), Boolean.parseBoolean($this.s("optional").text())));
});
Dependency extension = dependenciesMap.get("mybatis-plus-extension");
Assertions.assertEquals("compile", extension.getScope());
@ -63,5 +63,5 @@ class GeneratePomTest {
Assertions.assertTrue(generator.isOptional());
}
}
}