Profile

Cover photo
Robert Burkhall
Works at The Weather Channel
Attended Arizona Western College
Lives in Lawrenceville, GA
482,459 views
AboutPostsPhotosYouTube

Stream

Robert Burkhall

Android Studio  - 
 
Hi Folks,

 I'm in need of understanding how to create my own plugin implementation that will create dex files from my jetty asset .class files.  This is as far as I've gotten, know I'm close, and I know I'm just missing so info on how gradle works creating a custom plugin.  This is what I've added to my build.gradle.  Any insights on where I can find the definitive answer is appreciated.

class CreateDexFilesForJetty implements Plugin<Project> {
    String dest

    void createFile() {
        def file = project.file(dest) //getDestination()
        file.parentFile.mkdirs()
        file.write dest
    }

    void apply(Project project) {
        String buildDir = project.getBuildDir()
        String inClassDir  = "${buildDir}/classes/debug/com/wuttech/app"
        String outDexDir   = "${buildDir}/assets/debug/jetty"
        String classInFile = "${outDexDir}/pushWebSocketServlet.java"
        String dexOutFile  = "${inClassDir}/pushWebSocketServlet.java.dex"

        project.extensions.create("dirs", DexFileCreatorExtension)

        project.task('Unpack Dependencies') << {
            //
            dest = ""
        }

        project.task('Create Dex Files') << {
            println "${dexOutFile}"
            println "${classInFile}"
        }


        project.task('Zip Dex Files') << {
            println "${dexOutFile}"
            println "${classInFile}"
        }

    }
1
Xavier Ducrohet's profile photo
 
Is this meant to extend the android plugin? If you do you should look at looping on the generated variants and adding tasks per variants.

I would look at the source code of the Android plugin, and in particular the dex task (https://android.googlesource.com/platform/tools/base/+/idea133/build-system/gradle/src/main/groovy/com/android/build/gradle/tasks/Dex.groovy)

and how we configure it in BasePlugin (line 1390+): https://android.googlesource.com/platform/tools/base/+/idea133/build-system/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy

Note that the task names should not have spaces in them. I would also look on gradle.org about documentation on how to create plugins and tasks.
Add a comment...

Robert Burkhall

Android Studio  - 
 
Updating to Android Studio 0.5.1 revealed issues with my project after the upgrade, read what I did to resolve the issue.  #Gradle  
3
1
Add a comment...

Robert Burkhall

Shared publicly  - 
 
Why is  the fabric of our country being torn apart like this flag?  Neglect!
1
Add a comment...

Robert Burkhall

Shared publicly  - 
1
Add a comment...

Robert Burkhall

Shared publicly  - 
 
You have to change the port being used for the service, then things should work.
1
Add a comment...

Robert Burkhall changed his profile photo.

Shared publicly  - 
1
1
Add a comment...

Communities

14 communities

Robert Burkhall

Android Studio  - 
 
Has anyone got this error when switching preview's?  It seems that only the Nexus 5 (5.0") is the only working version.  And editing the in preview seems to be broken in 0.5.3.  This is really getting old.


Rendering Problem:
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
1
José Javier “Slif24” Vicente Verdú's profile photoTor Norbye's profile photoRobert Burkhall's profile photo
4 comments
 
Sorry folks for the delay, but the issue involved a missing api library.  Added the missing library, it went away.
Add a comment...

Robert Burkhall

Shared publicly  - 
 
Veronica & Grace
1
Add a comment...

Robert Burkhall

Shared publicly  - 
1
Add a comment...

Robert Burkhall

Shared publicly  - 
 
who is this young man?
1
Add a comment...

Robert Burkhall

Shared publicly  - 
 
My latest song!
1
Add a comment...
Communities
14 communities
Story
Tagline
Call me Professor!
Introduction
Multi Language Software Developer.
Education
  • Arizona Western College
    2008 - 2011
Basic Information
Gender
Male
Other names
Bobby
Work
Occupation
Software Developer
Skills
C#, C++, Html, CSS, Java, Javascript
Employment
  • The Weather Channel
    Product Support Engineer, 2014 - present
    Monitor & Support Intellistar System
  • Enterpise Select Resourcing
    C# Developer, 2013 - 2014
  • Tek Systems
    C# Developer, 2012 - 2013
  • Trax International
    C++ Developer, Linux, 2011 - 2012
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Lawrenceville, GA
Previously
Yuma, AZ - Las Vegas, NV
Links
Other profiles
Links