Skip to content

Commit

Permalink
update gradle.
Browse files Browse the repository at this point in the history
  • Loading branch information
nieqiurong committed Nov 27, 2019
1 parent d3ba3df commit 5b7d914
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 34 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {

@Data
@AllArgsConstructor
private static class Dependency {
private String artifactId;
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());
Expand All @@ -75,5 +75,5 @@ void test() throws IOException {
Assertions.assertFalse(bom.isOptional());
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {

@Data
@AllArgsConstructor
private static class Dependency {
private String artifactId;
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());
Expand All @@ -69,5 +69,5 @@ void test() throws IOException {
Assertions.assertTrue(cglib.isOptional());
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {

@Data
@AllArgsConstructor
private static class Dependency {
private String artifactId;
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());
Expand All @@ -78,5 +78,5 @@ void test() throws IOException {
Assertions.assertTrue(slf4jApi.isOptional());
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {

@Data
@AllArgsConstructor
private static class Dependency {
private String artifactId;
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());
Expand All @@ -69,5 +69,5 @@ void test() throws IOException {
Assertions.assertTrue(beetl.isOptional());
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
* @author nieqiurong 2019/2/9.
*/
class GeneratePomTest {

@Data
@AllArgsConstructor
private static class Dependency {
private String artifactId;
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());
Expand All @@ -63,5 +63,5 @@ void test() throws IOException {
Assertions.assertTrue(generator.isOptional());
}
}

}

0 comments on commit 5b7d914

Please sign in to comment.