File tree Expand file tree Collapse file tree 3 files changed +36
-5
lines changed
app/src/main/java/com/yogeshpaliyal/deepr/ui/components Expand file tree Collapse file tree 3 files changed +36
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ fun EditDeeplinkDialog(
41
41
link = it
42
42
isError = false
43
43
},
44
- label = { Text (" Deeplink" ) },
44
+ label = { Text (" Deeplink" )
45
+ },
45
46
isError = isError,
46
47
supportingText = {
47
48
if (isError) {
Original file line number Diff line number Diff line change @@ -7,9 +7,24 @@ plugins {
7
7
id(" org.jmailen.kotlinter" ) version " 5.2.0" apply false
8
8
}
9
9
10
- buildscript {
11
- dependencies {
12
- // classpath(libs.ktlint.compose)
13
- // classpath("io.nlopez.compose.rules:ktlint:0.4.27")
10
+ tasks.register(" copyGitHooks" , Copy ::class .java) {
11
+ description = " Copies the git hooks from /git-hooks to the .git folder."
12
+ group = " git hooks"
13
+ from(" $rootDir /scripts/pre-commit" )
14
+ into(" $rootDir /.git/hooks/" )
15
+ }
16
+ tasks.register(" installGitHooks" , Exec ::class .java) {
17
+ description = " Installs the pre-commit git hooks from /git-hooks."
18
+ group = " git hooks"
19
+ workingDir = rootDir
20
+ commandLine = listOf (" chmod" )
21
+ args(" -R" , " +x" , " .git/hooks/" )
22
+ dependsOn(" copyGitHooks" )
23
+ doLast {
24
+ logger.info(" Git hook installed successfully." )
14
25
}
15
26
}
27
+
28
+ afterEvaluate {
29
+ tasks.getByPath(" :app:preBuild" ).dependsOn(" :installGitHooks" )
30
+ }
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ echo "
3
+ ===============
4
+ | Running detekt...
5
+ ===============
6
+ "
7
+
8
+ ./gradlew --no-daemon --stacktrace :app:formatKotlin :app:lintKotlin
9
+
10
+ lintStatus=$?
11
+
12
+ # return 1 exit code if running checks fails
13
+ [ $lintStatus -ne 0 ] && exit 1
14
+
15
+ exit 0
You can’t perform that action at this time.
0 commit comments