Skip to content

Commit 56db07b

Browse files
committed
init version
1 parent 8095335 commit 56db07b

File tree

17 files changed

+1086
-1
lines changed

17 files changed

+1086
-1
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@
1010

1111
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
1212
hs_err_pid*
13+
14+
.DS_Store
15+
16+
.idea
17+
18+
build/
19+
.gradle/

17monipdb.dat

3.58 MB
Binary file not shown.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Changelog
2+
3+
## 0.0.1 (2017-01-016)
4+
### 增加
5+
* 高效IP查询实现
6+

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Bai Long
3+
Copyright (c) 2017 Qiniu
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
IP 17mon java version

build.gradle

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import java.util.regex.Matcher
2+
3+
apply plugin: 'java'
4+
5+
sourceCompatibility = 1.6
6+
targetCompatibility = 1.6
7+
version = '1.0'
8+
[compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
9+
10+
//[compileJava, compileTestJava]*.options.collect {options ->
11+
// options.debug = true
12+
// options.deprecation = true
13+
// options.compilerArgs.add '-Xlint'
14+
// options.compilerArgs.add '-Xlint:-unchecked'
15+
// options.compilerArgs.add '-Xlint:-serial'
16+
// options.compilerArgs.add '-Xlint:-rawtypes'
17+
//}
18+
19+
tasks.withType(JavaCompile) {
20+
options.compilerArgs << "-Xlint:unchecked"
21+
}
22+
23+
repositories {
24+
mavenCentral()
25+
}
26+
27+
dependencies {
28+
testCompile group: 'junit', name: 'junit', version: '4.12'
29+
}
30+
31+
32+
task getHomeDir << {
33+
println gradle.gradleHomeDir
34+
}
35+
36+
apply plugin: 'checkstyle'
37+
38+
39+
def versionName() {
40+
String config = 'src/main/java/qiniu/ip17mon/Locator.java'
41+
String fileContents = new File(config).text
42+
Matcher myMatcher = fileContents =~ /VERSION = "(.+)";/
43+
String version = myMatcher[0][1]
44+
println(version)
45+
return version
46+
}
47+
48+
def versionNameToCode(String version) {
49+
String v = version.replaceAll(/\./, '')
50+
return v.toLong()
51+
}
52+
53+
String version = versionName()
54+
int code = versionNameToCode(version)
55+
56+
setProperty('VERSION_NAME', version)
57+
setProperty('VERSION_CODE', code)
58+
59+
apply from: 'mvn_push.gradle'
60+
61+
apply plugin: 'eclipse'
62+
63+
task gen_eclipse(dependsOn:[
64+
'cleanEclipseProject', 'cleanEclipseClasspath',
65+
'eclipseProject', 'eclipseClasspath'])
66+
eclipseProject.mustRunAfter cleanEclipseProject
67+
eclipseClasspath.mustRunAfter cleanEclipseClasspath

config/checkstyle/checkstyle.xml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
5+
6+
<module name="Checker">
7+
<module name="NewlineAtEndOfFile"/>
8+
<module name="FileLength"/>
9+
<module name="FileTabCharacter"/>
10+
11+
<!-- Trailing spaces -->
12+
<module name="RegexpSingleline">
13+
<property name="format" value="\s+$"/>
14+
<property name="message" value="Line has trailing spaces."/>
15+
</module>
16+
17+
<!-- Space after 'for' and 'if' -->
18+
<module name="RegexpSingleline">
19+
<property name="format" value="^\s*(for|if)\b[^ ]"/>
20+
<property name="message" value="Space needed before opening parenthesis."/>
21+
</module>
22+
23+
<!-- For each spacing -->
24+
<module name="RegexpSingleline">
25+
<property name="format" value="^\s*for \(.*?([^ ]:|:[^ ])"/>
26+
<property name="message" value="Space needed around ':' character."/>
27+
</module>
28+
29+
<module name="SuppressionCommentFilter">
30+
</module>
31+
32+
<module name="TreeWalker">
33+
<module name="FileContentsHolder"/>
34+
<!-- Checks for Javadoc comments. -->
35+
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
36+
<!--module name="JavadocMethod"/-->
37+
<!--module name="JavadocType"/-->
38+
<!--module name="JavadocVariable"/-->
39+
<module name="JavadocStyle">
40+
<property name="checkFirstSentence" value="false"/>
41+
</module>
42+
43+
44+
<!-- Checks for Naming Conventions. -->
45+
<!-- See http://checkstyle.sf.net/config_naming.html -->
46+
<!--<module name="ConstantName"/>
47+
<module name="LocalFinalVariableName"/>
48+
<module name="LocalVariableName"/>-->
49+
<module name="MemberName"/>
50+
<module name="MethodName"/>
51+
<module name="PackageName"/>
52+
<!--<module name="ParameterName"/>-->
53+
<module name="StaticVariableName"/>
54+
<module name="TypeName"/>
55+
56+
57+
<!-- Checks for imports -->
58+
<!-- See http://checkstyle.sf.net/config_import.html -->
59+
<!--<module name="AvoidStarImport"/> -->
60+
<module name="IllegalImport"/>
61+
<!-- defaults to sun.* packages -->
62+
<module name="RedundantImport"/>
63+
<module name="UnusedImports">
64+
<property name="processJavadoc" value="true"/>
65+
</module>
66+
67+
<!-- Checks for Size Violations. -->
68+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
69+
<module name="LineLength">
70+
<property name="max" value="120"/>
71+
</module>
72+
<module name="MethodLength"/>
73+
74+
75+
<!-- Checks for whitespace -->
76+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
77+
<module name="GenericWhitespace"/>
78+
<!--<module name="EmptyForIteratorPad"/>-->
79+
<module name="MethodParamPad"/>
80+
<!--<module name="NoWhitespaceAfter"/>-->
81+
<!--<module name="NoWhitespaceBefore"/>-->
82+
<module name="OperatorWrap"/>
83+
<module name="ParenPad"/>
84+
<module name="TypecastParenPad"/>
85+
<module name="WhitespaceAfter"/>
86+
<module name="WhitespaceAround"/>
87+
88+
89+
<!-- Modifier Checks -->
90+
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
91+
<module name="ModifierOrder"/>
92+
<module name="RedundantModifier"/>
93+
94+
95+
<!-- Checks for blocks. You know, those {}'s -->
96+
<!-- See http://checkstyle.sf.net/config_blocks.html -->
97+
<module name="AvoidNestedBlocks"/>
98+
<!--module name="EmptyBlock"/-->
99+
<module name="LeftCurly"/>
100+
<!--<module name="NeedBraces"/>-->
101+
<module name="RightCurly"/>
102+
103+
104+
<!-- Checks for common coding problems -->
105+
<!-- See http://checkstyle.sf.net/config_coding.html -->
106+
<!--module name="AvoidInlineConditionals"/-->
107+
<module name="CovariantEquals"/>
108+
<module name="EmptyStatement"/>
109+
<!--<module name="EqualsAvoidNull"/>-->
110+
<module name="EqualsHashCode"/>
111+
<!--module name="HiddenField"/-->
112+
<module name="IllegalInstantiation"/>
113+
<!--module name="InnerAssignment"/-->
114+
<!--module name="MagicNumber"/-->
115+
<!--module name="MissingSwitchDefault"/-->
116+
<module name="RedundantThrows"/>
117+
<module name="SimplifyBooleanExpression"/>
118+
<module name="SimplifyBooleanReturn"/>
119+
120+
<!-- Checks for class design -->
121+
<!-- See http://checkstyle.sf.net/config_design.html -->
122+
<!--module name="DesignForExtension"/-->
123+
<!--<module name="FinalClass"/>-->
124+
<module name="HideUtilityClassConstructor"/>
125+
<module name="InterfaceIsType"/>
126+
<!--module name="VisibilityModifier"/-->
127+
128+
129+
<!-- Miscellaneous other checks. -->
130+
<!-- See http://checkstyle.sf.net/config_misc.html -->
131+
<module name="ArrayTypeStyle"/>
132+
<!--module name="FinalParameters"/-->
133+
<!--module name="TodoComment"/-->
134+
<module name="UpperEll"/>
135+
</module>
136+
</module>

gradle.properties

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
VERSION_NAME=
2+
VERSION_CODE=
3+
4+
GROUP=com.qiniu
5+
6+
POM_DESCRIPTION=Ip17mon for Java
7+
POM_URL=https://github.com/qiniu/ip17mon-java
8+
POM_SCM_URL=https://github.com/qiniu/ip17mon-java
9+
POM_SCM_CONNECTION=scm:[email protected]:qiniu/ip17mon-java.git
10+
POM_SCM_DEV_CONNECTION=scm:[email protected]:qiniu/ip17mon-java.git
11+
POM_LICENCE_NAME=MIT License
12+
POM_LICENCE_URL=http://opensource.org/licenses/MIT
13+
POM_LICENCE_DIST=repo
14+
15+
POM_DEVELOPER_ID=qiniu
16+
POM_DEVELOPER_NAME=Qiniu
17+
18+
POM_ARTIFACT_ID=ip17mon
19+
POM_NAME=ip17mon
20+
POM_PACKAGING=jar
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Wed Jan 07 13:33:33 CST 2015
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip

0 commit comments

Comments
 (0)