These are chat archives for Arasthel/SwissKnife

21st
Apr 2015
Eugene Kamenev
@eugene-kamenev
Apr 21 2015 04:23
guys I work on logging features, and want to ask you about usage of new feature that I called ProfileTransformation
@GroovyASTTransformationClass(['com.arasthel.swissknife.annotations.ProfileTransformation'])
@interface Profile {
    /**
     * Android log tag
     * @see {@link Log#i(java.lang.String, java.lang.String)}
     */
    String tag() default ''
    /*
    * Profile method execution time
    */
    boolean time() default true
    /**
     * Log method parameters
     */
    boolean values() default true
    /**
     * Log method result
     */
    boolean result() default true
    /**
     * Exclude logging method parameters
     */
    String[] excludes() default []
    /**
     * Include logging method parameters
     */
    String[] includes() default []
    /**
     * Log level
     */
    int level() default 3
}
Eugene Kamenev
@eugene-kamenev
Apr 21 2015 04:29
What do you think about these options? Maybe it is more then needed, or maybe I missed smthing?
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 16:43
It seems like I'm going to have to leave a tab always open for this, as I receive notification mails really late or never receive them
@pieces029 I'm giving you admin access
Andrew Reitz
@pieces029
Apr 21 2015 16:44
Woo hoo
@eun
opps
@eugene-kamenev are you working on the logging annotation stuff?
Eugene Kamenev
@eugene-kamenev
Apr 21 2015 16:44
@pieces yes
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 16:46
I like it :+1:
Andrew Reitz
@pieces029
Apr 21 2015 16:46
Cool, I'll work on getting CI setup then. @Arasthel do you mind checking in that maven publishing gradle file?
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 16:47
Yes, no problem
Andrew Reitz
@pieces029
Apr 21 2015 16:47
Thanks!
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 16:50
Done
Andrew Reitz
@pieces029
Apr 21 2015 17:09
How does the admin sharing across accounts work?
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 17:13
I'm not really sure
I added you as a collaborator as it was the only option that was present
It seems like admins are only available on organizations
Andrew Reitz
@pieces029
Apr 21 2015 17:16
OK. I didn't see an option to build the project in snap. I'll check again. Otherwise I can set it up on my branch and just send you the config.
Or we make an org for doing groovy stuff on android!
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 17:26
Yes, maybe that's a good idea :smile:
Maciej Górski
@mg6maciej
Apr 21 2015 17:40
Hello guys. Gitter is getting popular.
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 17:41
It's a great way to quickly exchange ideas without using issues :smile:
By the way, thanks for your Maps Extension library @mg6maciej, it kind of saved a project we had at an startup
We tried using several clustering libraries, but yours is by far the most efficient
Maciej Górski
@mg6maciej
Apr 21 2015 17:43
Just noticed your tweet 3 seconds after joining this chat. A coincidence? ;)
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 17:43
Maybe, I just saw your library a couple of hours ago :wink:
Maciej Górski
@mg6maciej
Apr 21 2015 17:49
I'm glad it's useful. I'm not maintaining it too much, but still using when I have a map in an app.
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 17:51
Well, the lack of documentation can make it a little difficult to use at first, but there are plenty of samples
So, what do you all guys think we need to add to SwissKnife?
Maciej Górski
@mg6maciej
Apr 21 2015 17:52
I still haven't used it...
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 17:52
What are those tasks you hate doing on Android and think that could be done more easily?
Maciej Górski
@mg6maciej
Apr 21 2015 17:52
I see @OrdonTeam, who is working with me, was already here.
Coding? :)
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 17:54
I was just asking everyone, last time we came up with the @Extra annotation, but I think we should move towards a DSL or extension method oriented library
That's kind of ambiguous :laughing:
Maciej Górski
@mg6maciej
Apr 21 2015 18:06
There is a new extensions lib for Kotlin: https://github.com/pawegio/KAndroid
I mean extension methods.
But do you want to with all-in-one library? Extension methods could be a separate lib.
I was working on Android-related annotations based on Lombok.
You already have Parcelable and instance state, which I have there.
Maciej Górski
@mg6maciej
Apr 21 2015 18:12
But better API for SharedPreferences is what someone already mentioned.
Andrew Reitz
@pieces029
Apr 21 2015 18:15
This is the one I made based off of Jake Wharton's in U2020 https://github.com/InkApplications/android-preferences
I like the idea of annotations though
Maciej Górski
@mg6maciej
Apr 21 2015 18:18
I have actually made my own AST transformation for SharedPrefs too ;)
These are test examples.
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 18:25
Your SharedPrefs project looks quite good
Maciej Górski
@mg6maciej
Apr 21 2015 18:25
I started doing the annotation and ended up writing framework for AST transfor testing ;)
It's not complete tho.
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 18:26
Also, as for annotations separated from DSLs, maybe you are right, SK could be an annotation-based library and we could have another with DSL methods
I'd like to know what @eugene-kamenev thinks about that
I'm looking at your AST testing code, it could be really useful here
Maciej Górski
@mg6maciej
Apr 21 2015 18:28
I love how Lombok guys did it, so I tried to copy their way.
Adding test cases is so easy with Lombok. Adding AST tranformation in Java is too hard.
I could contribute to SK if there were tests. ;)
Is CI already set up? I prefer to use Travis.
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 18:32
I've wanted to back all our AST code with tests for a while, but never had the time
Maciej Górski
@mg6maciej
Apr 21 2015 18:33
I can't write code without tests now. It's a pain. Like my Android Maps Extensions - no tests there. ;)
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 18:34
Yes, I know what you mean...
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 18:52
So if I understood your tests, you just compare the generated AST code with the expected one using Spock?
It would work with dynamic code, too?
Maciej Górski
@mg6maciej
Apr 21 2015 19:19
Yes, it's just comparing the code after processor work is done with what is expected.
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 19:19
Then it looks simple and easy to test
I could write a few tests :smile:
Maciej Górski
@mg6maciej
Apr 21 2015 19:20
Nie that that testing class is not complete.
Note *
Jorge Martin Espinosa
@Arasthel
Apr 21 2015 19:21
Yes, I saw that
Maciej Górski
@mg6maciej
Apr 21 2015 19:21
And is not tested ;)
Or only a few cases are tested.