Skip to content

Commit 5bfe098

Browse files
authored
Merge pull request #205 from botblock/feature/rename-javabotblockapiinfo
Rename JavaBotBlockAPIInfo to Info
2 parents b1d7b1c + c4d2e3f commit 5bfe098

File tree

2 files changed

+66
-3
lines changed

2 files changed

+66
-3
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright 2019 - 2021 Andre601
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
5+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
6+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7+
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8+
*
9+
* The above copyright notice and this permission notice shall be included in all copies or substantial
10+
* portions of the Software.
11+
*
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
13+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
15+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
16+
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17+
*/
18+
19+
package org.botblock.javabotblockapi.core;
20+
21+
/**
22+
* Class containing general information about the project.
23+
*
24+
* <p>The class can be used for things such as determining the {@link #VERSION used version} or to get some static info
25+
* like the {@link #GITHUB GitHub} or {@link #JENKINS Jenkins CI} URL.
26+
*
27+
* @since 6.6.0
28+
*/
29+
public class Info{
30+
31+
/**
32+
* Major version of the Wrapper.
33+
*/
34+
public static final int MAJOR = 6;
35+
/**
36+
* Minor version of the Wrapper.
37+
*/
38+
public static final int MINOR = 6;
39+
/**
40+
* Patch version of the Wrapper.
41+
*/
42+
public static final int PATCH = 0;
43+
44+
/**
45+
* Full version in the format {@code major.minor.patch}.
46+
*/
47+
public static final String VERSION = String.format("%d.%d.%d", MAJOR, MINOR, PATCH);
48+
49+
/**
50+
* URL to the GitHub repository.
51+
*/
52+
public static final String GITHUB = "https://github.com/botblock/JavaBotBlockAPI";
53+
54+
public static final String JENKINS = "https://ci.codemc.io/job/botblock/job/JavaBotBlockAPI";
55+
}

core/src/main/java/org/botblock/javabotblockapi/core/JavaBotBlockAPIInfo.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,35 @@
1818

1919
package org.botblock.javabotblockapi.core;
2020

21+
import org.botblock.javabotblockapi.core.annotations.DeprecatedSince;
22+
import org.botblock.javabotblockapi.core.annotations.PlannedRemoval;
23+
2124
/**
2225
* Class containing static info used in other modules.
2326
* <br>Feel free to use the info shared here inside your bot if you, for example, want to share what Lib your bot
2427
* uses to post Guild count or similar.
2528
*
29+
* @deprecated Class was changed to {@link org.botblock.javabotblockapi.core.Info Info}.
30+
*
2631
* @since 6.4.0
2732
*/
33+
@Deprecated
34+
@DeprecatedSince(major = 6, minor = 6, patch = 0, replacements = {"Info.java"})
35+
@PlannedRemoval(major = 6, minor = 6, patch = 2)
2836
public class JavaBotBlockAPIInfo{
2937

3038
/**
3139
* Major version of the Wrapper.
3240
*/
33-
public static final String MAJOR = "6";
41+
public static final String MAJOR = String.valueOf(Info.MAJOR);
3442
/**
3543
* Minor version of the Wrapper.
3644
*/
37-
public static final String MINOR = "5";
45+
public static final String MINOR = String.valueOf(Info.MINOR);
3846
/**
3947
* Patch version of the Wrapper.
4048
*/
41-
public static final String PATCH = "1";
49+
public static final String PATCH = String.valueOf(Info.PATCH);
4250

4351
/**
4452
* Full version in the format {@code major.minor.patch}.

0 commit comments

Comments
 (0)