Android Studio Project Structure

The build system is independent from Android Studio

The build configuration for your project is defined inside Gradle build files

Gradle build files use Groovy syntax. Groovy is a dynamic language that you can use to define custom build logic and to interact with the Android-specific elements provided by the Android plugin for Gradle.

Many popular software libraries and tools are available in public Maven repositories. For these dependencies you only have to specify their Maven coordinates, which uniquely identify each element in a remote repository. The format for Maven coordinates used in the build system is group:name:version. For example, the Maven coordinates for version 16.0.1 of the Google Guava libraries are com.google.guava:guava:16.0.1.


dependencies {

    ...

    compile project(":lib")

}



********************************************************************


repositories {

    mavenCentral()

}


***important:jcenter() is a superset of mavenCentral()

*************************

FB pushed its SDK to mavencentral ;is it gonna keep it on?



************************

https://github.com/sromku/android-simple-facebook


Simple Facebook SDK for Android which wraps original Facebook SDK. 

For support of older versions of facebook SDK 3.8 and below, go to v1.0 branch.


This is a library project which makes the life much easier by coding less code for being able to login, publish feeds and open graph stories, invite friends and more.


Since my feeling was that the usage of Facebook SDK was too complicated for simple actions like login, I decided to create simpler API for the same actions. I use this API in my applications and maintain the code.


project/

   |

   |---src/

        |---flavorA2/

        |      |

        |      |---java/

        |      |     |---com.abc.flavorA.mk2

        |      |                 |-----classA.java

        |      |                 |-----classB.java

        |      |---res/

        |      |---AndroidManifest.xml

        |

        |---main

        |      |---java/

        |      |     |---com.abc.flavorA

        |      |                 |-----classA.java

        |      |                 |-----classB.java

        |      |                 |-----classC.java

        |      |                 |-----classD.java

        |      |---res/

        |      |    |---drawable/

        |      |    |---layout/

        |      |    |---values/

        |      |         

        |      |---AndroidManifest.xml

        |

        |---flavorA



***********************************************************

Note 1 :

build.gradle file in root of a project will define the version and dependency of your Gradle and also you repository [jcenter()]


Note 2:

When upgrading Android Studio :

Renamed a few properties to make things more consistent.

BuildType.runProguard                 ->  minifyEnabled

BuildType.zipAlign                    -> zipAlignEnabled

BuildType.jniDebugBuild               -> jniDebuggable

BuildType.renderscriptDebug           -> renderscriptDebuggable

ProductFlavor.renderscriptSupportMode -> renderscriptSupportModeEnabled

ProductFlavor.renderscriptNdkMode     -> renderscriptNdkModeEnabled 


 © Xosrov 2016