summaryrefslogtreecommitdiff
path: root/README
blob: 7260688422fb92721d8ffc83257a904a53fa770d (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
=============================================================================
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, 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'
}

That should be it.

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/srv/git/flycheck-android-experimental.git

Two important gradle tasks:

./gradlew uploadArchive
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.tar