Android logo

Android, Gradle and compile-time only dependencies

Android plugin for Gradle does not support Java-style compile time only dependencies. After spending a few hours on trying to build android app targeted for Amazon SDK (without using Amazon’s Android specific plugin but just their jar stubs for maps, ADM and Home widget), I finally found that the one way to support compile-time dependencies is following. For application project Groovy 1 2 3 4 5 6 7 8 9 10 11 12 13 configurations { provided } dependencies { // ... provided fileTree(dir: "${project.rootDir}/path_to_libs_dir", include: '*.jar') } // Android's version of sourceSets.main.compileClasspath android.applicationVariants.each { variant -> variant.javaCompile.classpath += configurations.provided } For the library project Groovy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 configurations { provided } dependencies { // ... compile fileTree(dir: 'libs', include: '*.jar') provided fileTree(dir: "${project.rootDir}/patch_to_libs_dir", include: '*.jar') } android.libraryVariants.all { variant -> // Exclude the jar files from making its way into the final apk. // Irrespective of what the path_to_libs_dir is the final jar files end up in libs dir. variant.packageLibrary.exclude('libs/lib1.jar') variant.packageLibrary.exclude('libs/lib2.jar') // ... } References https://stackoverflow.com/questions/16613722/gradle-configurations-not-working-as-expected-in-new-android-build-system https://stackoverflow.com/a/24157721

A walk in San Francisco

“Give me your wallet, bro” he said in his heavy accent while holding a gun to my forehead. It seems, out of pure curiosity, I have walked into this shady neighborhood of San Francisco. “Pull out your wallet,” he shouted, “and count the cash,” this time bringing my full attention to him. I pulled out my wallet, carefully counted all the nickels, pennies and dimes and said, “13 dollars, 59 cents, and one Indian Rupee”. “That’s it,” he blustered at the peak of his voice while I stood sweating profusely on a chilly night. He was not amused and pulled the trigger.

Only The Paranoid Survives

Book summary: Only The Paranoid Survives by Andrew Grove

The book talks about inflection points which if not handled carefully, are drastic (10x) enough to put a company out of business.

Gadar Memorial

A visit to Gadar Memorial in San Francisco

Getting Inside After getting misdirected once to 436 Hill St, San Francisco which is the old original address which does not exist anymore, I eventually reached 5 Wood St, San Francisco. It was the time of sunset, I knew I was late, but finally, it felt good to see a nondescript apartment marked “Gadar memorial”. Least, I expected locked doors. I did not drive 40 miles to stand in front of this locked door. There must be a way to get in, I contemplated, as I noticed an Indian woman walking upstairs towards me. “I am here to see Gadar Party’s office”, I asked as she stammered while replying in English. “हिंदी बोलती है आप ?”, I inquired. “जी हाँ”, she confirmed. “मैं आशीष, south bay से आया हूँ ग़दर स्मारक देखना था । “, I said, while pointing towards the building. “आपके पास consulate से permission है?”, she asked. “consulate से permission?”, I inquired. “consulate से बिना permission लिए यहाँ आना मना है । “, she confirmed. Even for bureaucratic Indian govt, taking permission from the consulate to visit a first world war era memorial is perplexing. I believe this is the only such Indian memorial in the western hemisphere. Of course, I was not ready to yield and drive back another 40 miles before paying the homage. We both stood there motionless with an awkward silence. Someone had to blink, thankfully, she did. “एक बार मैं अपने husband से बात करती हूँ । “, she said. She unlocked the door and went inside, and after some chatter, they both came out, and after some quick conversation, he allowed me in to visit the memorial. The rest of the discussion with them was pretty friendly. ...

So good they can't ignore you by Cal Newport

Book Summary: So good they can't ignore you by Cal Newport

The book is an excellent collection of rules which the author discovered while finishing his Ph.D. and transitioning into a full-time faculty position.

The Innovator's Dilemma

Book Summary: The Innovator's Dilemma

At some point, the incumbent’s product’s performance exceeds the demand of most customers. Then the “edge” that these performance metrics provided is lost, and the customers’ value proposition changes. They start valuing some other metrics, along which a disruptor’s product has better performance. The disruptor has an early mover’s advantage as well as leading to the demise of the incumbent.

Thoughts on Bitcoin (part 2)

Thoughts on Bitcoin (part 2)

Here is a summary of things that have happened since I wrote the previous Bitcoin blog post.

The Education of Millionaires by Michael Ellsberg

Book summary: The Education of Millionaires

The book emphasizes heavily life education, glorifies college dropouts, and questions college education except for specialized fields like law and medicine.

Thoughts on Bureaucrats, Technocrats and Politicians

Bureaucrats take the actions which are justifiable (by book or by order of their superiors), they care less about consequences (in case there are multiple possible actions, they let the politician decide the appropriate action). Technocrats take the actions which (according to their analysis) have best (long term/short term) consequences, they care less about how harsh the action could be on certain individuals and their logical thinking usually fails to take into account the law of unintended consequences like Cobra Effect. ...

How to create a mind

Book summary: How to create a mind by Ray Kurzweil

The book is an insightful journey into the contemporary understanding of the human brain and how scientists are trying to replicate it. Major takeaways from the book are listed below.

👉 Sign up for Ashishb’s Insiders Newsletter 👈