Skip to content

Commit 1a28da0

Browse files
committed
Added publishing
1 parent a67a236 commit 1a28da0

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ created to make AbstractMenus more lightweight.
66
### Note
77
This library provides read-only API for configs,
88
since this library written especially for AM,
9-
which doesn't write anything in config.
9+
which doesn't writes anything in config.

build.gradle

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
plugins {
2-
id 'java'
2+
id 'com.github.johnrengelman.shadow' version '7.1.2'
3+
id 'java-library'
4+
id 'maven-publish'
35
}
46

5-
group 'ru.nanit'
7+
group 'ru.abstractmenus'
68
version '1.0'
79

810
repositories {
@@ -13,9 +15,29 @@ dependencies {
1315
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
1416
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
1517

16-
implementation project(":typesafe")
18+
api project(":typesafe")
19+
}
20+
21+
shadowJar {
22+
archiveClassifier.set('')
23+
}
24+
25+
java {
26+
withJavadocJar()
27+
withSourcesJar()
1728
}
1829

1930
test {
2031
useJUnitPlatform()
21-
}
32+
}
33+
34+
publishing {
35+
publications {
36+
maven(MavenPublication) { publication ->
37+
project.shadow.component(publication)
38+
artifact javadocJar
39+
artifact sourcesJar
40+
}
41+
}
42+
}
43+

src/test/java/TempTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ public void test() throws Exception {
2323

2424
System.out.println(node.toString());
2525
System.out.println(node.node("map", "param1").getString());
26+
System.out.println(node.node("map", "param15").getString());
2627
System.out.println(node.node("list").getList(String.class));
2728
System.out.println(node.node("list_of_lists").getList(List.class));
2829
System.out.println(node.node("user").getValue(User.class));
30+
System.out.println(node.node("users").getList(User.class));
2931
}
3032

3133
private class User {

typesafe/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'java'
33
}
44

5-
group 'ru.nanit'
5+
group 'ru.abstractmenus'
66
version '1.0'
77

88
repositories {

0 commit comments

Comments
 (0)