src/main/java/com/simpligility/maven/plugins/android/phase01generatesources/GenerateSourcesMojo.java
private boolean isBuildConfigPresent( Artifact artifact, String packageName ) throws MojoExecutionException
    {
        try
        {
            JarFile jar = new JarFile( getUnpackedAarClassesJar( artifact ) );
            JarEntry entry = jar.getJarEntry( packageName.replace( '.', '/' ) + "/BuildConfig.class" );

            return ( entry != null );
        }
        catch ( IOException e )
        {
            getLog().error( "Error generating BuildConfig ", e );
            throw new MojoExecutionException( "Error generating BuildConfig", e );
        }
    }
private boolean isBuildConfigPresent( Artifact artifact, String packageName ) throws MojoExecutionException
    {
        try
        {
            JarFile jar = new JarFile( getUnpackedAarClassesJar( artifact ) );
            JarEntry entry = jar.getJarEntry( packageName.replace( '.', '/' ) + "/BuildConfig.class" );

            return ( entry != null );
        }
        catch ( IOException e )
        {
            getLog().error( "Error generating BuildConfig ", e );
            throw new MojoExecutionException( "Error generating BuildConfig", e );
        }
    }
private boolean isBuildConfigPresent ( Artifact artifact , String packageName ) throws MojoExecutionException { try { JarFile jar = new JarFile ( getUnpackedAarClassesJar ( artifact ) ) ; JarEntry entry = jar . getJarEntry ( packageName . replace ( ' ' , ' ' ) + "/BuildConfig.class" ) ; return ( entry != null ) ; } catch ( IOException e ) { getLog ( ) . error ( "Error generating BuildConfig " , e ) ; throw new MojoExecutionException ( "Error generating BuildConfig" , e ) ; } }
Check whether the artifact includes a BuildConfig located in a given package.

@param artifact    an AAR artifact to look for BuildConfig in
@param packageName BuildConfig package name
@throws MojoExecutionException
Check whether the artifact includes a BuildConfig located in a given package .