@Override @NonNull public File getManifestFile() { return getManifest().getSrcFile(); }
@Override @NonNull public AndroidSourceSet setRoot(String path) { javaSource.setSrcDirs(Collections.singletonList(path + "/java")); javaResources.setSrcDirs(Collections.singletonList(path + "/resources")); res.setSrcDirs(Collections.singletonList(path + "/" + SdkConstants.FD_RES)); assets.setSrcDirs(Collections.singletonList(path + "/" + SdkConstants.FD_ASSETS)); manifest.srcFile(path + "/" + SdkConstants.FN_ANDROID_MANIFEST_XML); aidl.setSrcDirs(Collections.singletonList(path + "/aidl")); renderscript.setSrcDirs(Collections.singletonList(path + "/rs")); jni.setSrcDirs(Collections.singletonList(path + "/jni")); jniLibs.setSrcDirs(Collections.singletonList(path + "/jniLibs")); return this; }
@Override @NonNull public File getManifestFile() { return getManifest().getSrcFile(); }
@Override @NonNull public AndroidSourceSet setRoot(String path) { javaSource.setSrcDirs(Collections.singletonList(path + "/java")); javaResources.setSrcDirs(Collections.singletonList(path + "/resources")); res.setSrcDirs(Collections.singletonList(path + "/" + SdkConstants.FD_RES)); assets.setSrcDirs(Collections.singletonList(path + "/" + SdkConstants.FD_ASSETS)); manifest.srcFile(path + "/" + SdkConstants.FN_ANDROID_MANIFEST_XML); aidl.setSrcDirs(Collections.singletonList(path + "/aidl")); renderscript.setSrcDirs(Collections.singletonList(path + "/rs")); jni.setSrcDirs(Collections.singletonList(path + "/jni")); jniLibs.setSrcDirs(Collections.singletonList(path + "/jniLibs")); shaders.setSrcDirs(Collections.singletonList(path + "/shaders")); return this; }
@Override protected void generate(Project project) throws IOException { if (config != null) { for (AndroidSourceSet sourceSet : config.getSourceSets()) { mRenderer.getBuilder().subheading(sourceSet.getName()); renderKeyValue("Compile configuration: ", sourceSet.getCompileConfigurationName()); renderKeyValue("build.gradle name: ", "android.sourceSets." + sourceSet.getName()); renderDirectorySet("Java sources", sourceSet.getJava(), project); if (!sourceSet.getName().startsWith(VariantType.UNIT_TEST.getPrefix())) { renderKeyValue( "Manifest file: ", project.getRootProject().relativePath( sourceSet.getManifest().getSrcFile())); renderDirectorySet("Android resources", sourceSet.getRes(), project); renderDirectorySet("Assets", sourceSet.getAssets(), project); renderDirectorySet("AIDL sources", sourceSet.getAidl(), project); renderDirectorySet("RenderScript sources", sourceSet.getRenderscript(), project); renderDirectorySet("JNI sources", sourceSet.getJni(), project); renderDirectorySet("JNI libraries", sourceSet.getJniLibs(), project); } renderDirectorySet("Java-style resources", sourceSet.getResources(), project); mRenderer.getTextOutput().println(); } } mRenderer.complete(); }
@Override protected void generate(Project project) throws IOException { if (config != null) { for (AndroidSourceSet sourceSet : config.getSourceSets()) { mRenderer.getBuilder().subheading(sourceSet.getName()); renderKeyValue("Compile configuration: ", sourceSet.getCompileConfigurationName()); renderKeyValue("build.gradle name: ", "android.sourceSets." + sourceSet.getName()); renderDirectorySet("Java sources", sourceSet.getJava(), project); if (!sourceSet.getName().startsWith(VariantType.UNIT_TEST.getPrefix())) { renderKeyValue( "Manifest file: ", project.getRootProject().relativePath( sourceSet.getManifest().getSrcFile())); renderDirectorySet("Android resources", sourceSet.getRes(), project); renderDirectorySet("Assets", sourceSet.getAssets(), project); renderDirectorySet("AIDL sources", sourceSet.getAidl(), project); renderDirectorySet("RenderScript sources", sourceSet.getRenderscript(), project); renderDirectorySet("JNI sources", sourceSet.getJni(), project); renderDirectorySet("JNI libraries", sourceSet.getJniLibs(), project); } renderDirectorySet("Java-style resources", sourceSet.getResources(), project); mRenderer.getTextOutput().println(); } } mRenderer.complete(); }