Skip to content

Commit 2a64382

Browse files
committed
Bump Versions, add specific formatter style
1 parent f2f21a6 commit 2a64382

File tree

8 files changed

+269
-64
lines changed

8 files changed

+269
-64
lines changed

CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ If you would like to contribute code you can do so through GitHub by forking the
44

55
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible.
66

7+
Please format your code using ``kotlinFormatter.xml`` file from [here](docs/kotlinFormatter.xml).
8+
9+
Using this code formatter will help us maintain consistency in code style.
10+
711
## License
812

913
By contributing your code, you agree to license your contribution under the terms of the MIT : https://github.com/ReKotlin/rekotlin-router/blob/master/LICENSE.md

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ which will help keep your pull request simple and easy to apply.
215215

216216
Before submitting the pull request, make sure all existing tests are passing, and add the new test if it is required.
217217

218+
### Code Formatting
219+
Please format your code using ``kotlinFormatter.xml`` file from [here](docs/kotlinFormatter.xml).
220+
221+
Using this code formatter will help us maintain consistency in code style.
222+
218223
### New functionality
219224
If you want to add new functionality, please file a new proposal issue first to make sure that it is not in progress already. If you have any questions, feel free to create a question issue.
220225

build.gradle

+7-24
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
group 'org.rekotlin-router'
3-
version '0.1.0-SNAPSHOT'
4-
5-
6-
72
buildscript {
83
ext {
9-
kotlin_version = '1.2.50'
10-
dokka_version = '0.9.15'
11-
rekotlin_version = '1.1.1'
4+
kotlin_version = '1.3.30'
5+
dokka_version = '0.9.18'
6+
rekotlin_version = '1.0.0'
127
gradle_bintray_plugin_version = "1.4"
138
android_maven_gradle_plugin_version = "1.4.1"
149
jacoco_android_version = "0.1.1"
15-
android_tools_build_gradle_version = "3.0.0-alpha4"
10+
android_tools_build_gradle_version = "3.4.0"
1611
}
1712

1813
repositories {
19-
//google()
20-
maven {
21-
url 'https://maven.google.com'
22-
}
14+
google()
2315
jcenter()
2416
mavenLocal()
2517
}
@@ -28,24 +20,15 @@ buildscript {
2820
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
2921
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}"
3022
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:${gradle_bintray_plugin_version}"
31-
classpath "com.github.dcendents:android-maven-gradle-plugin:${android_maven_gradle_plugin_version}"
32-
classpath "com.dicedmelon.gradle:jacoco-android:${jacoco_android_version}"
23+
3324
}
3425
}
3526

36-
3727
allprojects {
3828
repositories {
39-
// google()
40-
maven {
41-
url 'https://maven.google.com'
42-
}
29+
google()
4330
jcenter()
4431
mavenCentral()
45-
// maven {
46-
// url 'https://rekotlin.s3-ap-southeast-1.amazonaws.com/snapshots'
47-
// }
48-
4932
}
5033
}
5134

docs/kotlinFormatter.xml

+239
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
<code_scheme name="kotlinFormatter" version="173">
2+
<AndroidXmlCodeStyleSettings>
3+
<option name="USE_CUSTOM_SETTINGS" value="true" />
4+
</AndroidXmlCodeStyleSettings>
5+
<JavaCodeStyleSettings>
6+
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
7+
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
8+
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
9+
<value />
10+
</option>
11+
<option name="IMPORT_LAYOUT_TABLE">
12+
<value>
13+
<package name="android" withSubpackages="false" static="false" />
14+
<emptyLine />
15+
<package name="com" withSubpackages="false" static="false" />
16+
<emptyLine />
17+
<package name="junit" withSubpackages="false" static="false" />
18+
<emptyLine />
19+
<package name="net" withSubpackages="false" static="false" />
20+
<emptyLine />
21+
<package name="org" withSubpackages="false" static="false" />
22+
<emptyLine />
23+
<package name="java" withSubpackages="false" static="false" />
24+
<emptyLine />
25+
<package name="javax" withSubpackages="false" static="false" />
26+
<emptyLine />
27+
<package name="" withSubpackages="true" static="false" />
28+
<emptyLine />
29+
<package name="" withSubpackages="true" static="true" />
30+
<emptyLine />
31+
</value>
32+
</option>
33+
</JavaCodeStyleSettings>
34+
<JetCodeStyleSettings>
35+
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
36+
<value>
37+
<package name="java.util" withSubpackages="false" static="false" />
38+
<package name="kotlinx.android.synthetic" withSubpackages="false" static="false" />
39+
</value>
40+
</option>
41+
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
42+
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
43+
</JetCodeStyleSettings>
44+
<Objective-C-extensions>
45+
<file>
46+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
47+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
48+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
49+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
50+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
51+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
52+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
53+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
54+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
55+
</file>
56+
<class>
57+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
58+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
59+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
60+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
61+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
62+
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
63+
</class>
64+
<extensions>
65+
<pair source="cpp" header="h" fileNamingConvention="NONE" />
66+
<pair source="c" header="h" fileNamingConvention="NONE" />
67+
</extensions>
68+
</Objective-C-extensions>
69+
<XML>
70+
<option name="XML_KEEP_LINE_BREAKS" value="false" />
71+
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
72+
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
73+
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
74+
</XML>
75+
<codeStyleSettings language="XML">
76+
<option name="FORCE_REARRANGE_MODE" value="1" />
77+
<indentOptions>
78+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
79+
</indentOptions>
80+
<arrangement>
81+
<rules>
82+
<section>
83+
<rule>
84+
<match>
85+
<AND>
86+
<NAME>xmlns:android</NAME>
87+
<XML_NAMESPACE>^$</XML_NAMESPACE>
88+
</AND>
89+
</match>
90+
</rule>
91+
</section>
92+
<section>
93+
<rule>
94+
<match>
95+
<AND>
96+
<NAME>xmlns:.*</NAME>
97+
<XML_NAMESPACE>^$</XML_NAMESPACE>
98+
</AND>
99+
</match>
100+
<order>BY_NAME</order>
101+
</rule>
102+
</section>
103+
<section>
104+
<rule>
105+
<match>
106+
<AND>
107+
<NAME>.*:id</NAME>
108+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
109+
</AND>
110+
</match>
111+
</rule>
112+
</section>
113+
<section>
114+
<rule>
115+
<match>
116+
<AND>
117+
<NAME>.*:name</NAME>
118+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
119+
</AND>
120+
</match>
121+
</rule>
122+
</section>
123+
<section>
124+
<rule>
125+
<match>
126+
<AND>
127+
<NAME>name</NAME>
128+
<XML_NAMESPACE>^$</XML_NAMESPACE>
129+
</AND>
130+
</match>
131+
</rule>
132+
</section>
133+
<section>
134+
<rule>
135+
<match>
136+
<AND>
137+
<NAME>style</NAME>
138+
<XML_NAMESPACE>^$</XML_NAMESPACE>
139+
</AND>
140+
</match>
141+
</rule>
142+
</section>
143+
<section>
144+
<rule>
145+
<match>
146+
<AND>
147+
<NAME>.*</NAME>
148+
<XML_NAMESPACE>^$</XML_NAMESPACE>
149+
</AND>
150+
</match>
151+
<order>BY_NAME</order>
152+
</rule>
153+
</section>
154+
<section>
155+
<rule>
156+
<match>
157+
<AND>
158+
<NAME>.*:layout_width</NAME>
159+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
160+
</AND>
161+
</match>
162+
</rule>
163+
</section>
164+
<section>
165+
<rule>
166+
<match>
167+
<AND>
168+
<NAME>.*:layout_height</NAME>
169+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
170+
</AND>
171+
</match>
172+
</rule>
173+
</section>
174+
<section>
175+
<rule>
176+
<match>
177+
<AND>
178+
<NAME>.*:layout_.*</NAME>
179+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
180+
</AND>
181+
</match>
182+
<order>BY_NAME</order>
183+
</rule>
184+
</section>
185+
<section>
186+
<rule>
187+
<match>
188+
<AND>
189+
<NAME>.*:width</NAME>
190+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
191+
</AND>
192+
</match>
193+
<order>BY_NAME</order>
194+
</rule>
195+
</section>
196+
<section>
197+
<rule>
198+
<match>
199+
<AND>
200+
<NAME>.*:height</NAME>
201+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
202+
</AND>
203+
</match>
204+
<order>BY_NAME</order>
205+
</rule>
206+
</section>
207+
<section>
208+
<rule>
209+
<match>
210+
<AND>
211+
<NAME>.*</NAME>
212+
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
213+
</AND>
214+
</match>
215+
<order>BY_NAME</order>
216+
</rule>
217+
</section>
218+
<section>
219+
<rule>
220+
<match>
221+
<NAME>*android*:*</NAME>
222+
</match>
223+
</rule>
224+
</section>
225+
<section>
226+
<rule>
227+
<match>
228+
<AND>
229+
<NAME>.*</NAME>
230+
<XML_NAMESPACE>.*</XML_NAMESPACE>
231+
</AND>
232+
</match>
233+
<order>BY_NAME</order>
234+
</rule>
235+
</section>
236+
</rules>
237+
</arrangement>
238+
</codeStyleSettings>
239+
</code_scheme>

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-rc-1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 commit comments

Comments
 (0)