File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
colorpickerview/src/main/java/com/skydoves/colorpickerview/kotlin Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Designed and developed by 2017 skydoves (Jaewoong Eum)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package com.skydoves.colorpickerview.kotlin
18
+
19
+ import android.content.Context
20
+ import com.skydoves.colorpickerview.ColorPickerDialog
21
+
22
+ @DslMarker
23
+ internal annotation class ColorPickerDsl
24
+
25
+ /* *
26
+ * Creates a lambda scope for implementing [ColorPickerDialog] using its [ColorPickerDialog.Builder].
27
+ *
28
+ * @param block lambda scope for receiving [ColorPickerDialog.Builder].
29
+ * @return new instance of [ColorPickerDialog].
30
+ */
31
+ @ColorPickerDsl
32
+ @JvmSynthetic
33
+ fun Context.colorPickerDialog (block : ColorPickerDialog .Builder .() -> Unit ) =
34
+ ColorPickerDialog .Builder (this ).apply (block)
Original file line number Diff line number Diff line change @@ -22,4 +22,11 @@ spotless {
22
22
googleJavaFormat()
23
23
endWithNewline()
24
24
}
25
+ kotlin {
26
+ target " **/*.kt"
27
+ ktlint(" $versions . ktlintGradle " ). userData([' indent_size' : ' 2' , ' continuation_indent_size' : ' 2' ])
28
+ licenseHeaderFile " $rootDir /spotless.license.java"
29
+ trimTrailingWhitespace()
30
+ endWithNewline()
31
+ }
25
32
}
You can’t perform that action at this time.
0 commit comments