blob: 1f393d9f17496e7b57467b5ab9c6d1a8fbd5179a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
=============================================================================
For the user
=============================================================================
First of all, make sure you have flycheck installed.
Download Emacs package from:
http://www.spawned.biz/flycheck-android/flycheck-android-experimental.tar
Install using 'package-install-file.
Add the below to your Emacs init file somewhere:
(add-to-list
'java-mode-hook
'(lambda () (require 'flycheck-android-experimental)))
= Then you have two choices, the most direct is to include flycheck
= plugin directly to your project:
Then, in your root build.gradle, add:
buildscript {
repositories {
maven {
url uri('http://www.spawned.biz/the_jk/repo')
}
// ...
}
dependencies {
classpath 'org.thejk:flycheck-android-experimental:0.1'
// ...
}
}
allprojects {
apply plugin: 'org.thejk.flycheck-android-experimental'
}
= Or you can apply it to your gradle init script, applying the task
= to *all* projects
Put in $HOME/.gradle/init.gradle or $HOME/.gradle/init.d/flycheck-android.gradle:
initscript {
repositories {
maven {
url uri('http://www.spawned.biz/the_jk/repo')
}
}
dependencies {
classpath 'org.thejk:flycheck-android-experimental:0.3.16'
}
}
apply plugin: org.thejk.FlycheckAndroidExperimentalInitPlugin
That should be it.
= If you have product flavors you might want to specify which
= variant should be used.
(add-to-list
'java-mode-hook
'(lambda ()
(progn
(require 'flycheck-android-experimental)
(setq flycheck-android-java-variant "devArm7Debug"))))
= If you have a large project the default of always running generate*Sources
= before checking the file might slow things down, if so set skip-gen
(add-to-list
'java-mode-hook
'(lambda ()
(progn
(require 'flycheck-android-experimental)
(setq flycheck-android-java-skip-gen t))))
= If you use checkstyle, you can expand the java-mode-hook:
(add-to-list
'java-mode-hook
'(lambda ()
(progn
(require 'flycheck-android-experimental)
(setq flycheck-android-java-checkstyle-jar
"tools/checkstyle/checkstyle-6.5-all.jar"
flycheck-android-java-checkstyle-path
"tools/checkstyle"
flycheck-android-java-checkstyle-config
"checkstyle-config-android.xml"
flycheck-android-java-checkstyle-properties
"checkstyle.properties"))))
These are standard flycheck options so there are other ways to set them.
If flycheck-android-java-checkstyle-jar is set checkstyle will be used, if it
isn't set then the other options are ignored.
flycheck-android-java-checkstyle-jar and flycheck-android-java-checkstyle-path
are both relative the project directory.
flycheck-android-java-checkstyle-config and
flycheck-android-java-checkstyle-properties are both relative
flycheck-android-java-checkstyle-path or if it's not set, the project directory.
All options can be absolute paths.
If flycheck-android-java-checkstyle-path is set it will be used as working
directory otherwise the project directory is.
=============================================================================
For the developer
=============================================================================
Get the code at git://git.spawned.biz/flycheck-android-experimental.git
Two important gradle tasks:
./gradlew publish
Build the gradle plugin jar and upload the "../repo" repository by default.
./gradle packageList
Build the Emacs package placing it in
build/flycheck-android-experimental-0.3.16.tar
|