Permalink
Browse files

gradle and support widgets

  • Loading branch information...
koush committed Jul 7, 2014
1 parent 6972532 commit 3a25d68466f3c76e5091a008929a777a99e05e1a
View
@@ -7,3 +7,4 @@ gen
.DS_Store
.settings
libs
build
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>

This comment has been minimized.

Show comment
Hide comment
@lovesitdoll
@lovesitdoll
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.koushikdutta.superuser"
android:versionCode="1030"
android:versionName="1.0.3.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
tools:node="replace" />
<permission
android:name="android.permission.REQUEST_SUPERUSER"
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="Gradle.Superuser" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":Superuser:Superuser" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugJava" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/res" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-annotations-21.0.0-rc1" level="project" />
<orderEntry type="module" module-name="Widgets-Widgets" exported="" />
</component>
</module>
View
@@ -0,0 +1,51 @@
task wrapper(type: Wrapper) {
gradleVersion = '1.6'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
dependencies {
compile project(':Widgets:Widgets')
}
android {
packagingOptions {
exclude 'META-INF/beans.xml'
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
jniLibs.srcDirs = ['libs']
assets.srcDirs = ['assets/']
res.srcDirs = ['res/']
java.srcDirs = ['src/']
aidl.srcDirs = ['src/']
}
}
compileSdkVersion 21
buildToolsVersion '20.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
}
}
// upload to maven task
//if (System.getenv().I_AM_KOUSH == 'true') {
// apply from: 'https://raw.github.com/koush/mvn-repo/master/maven.gradle'
//}
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
style="@android:style/TextAppearance.Large"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</TextView>
@@ -28,6 +28,7 @@
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.TextView;
@@ -125,7 +126,9 @@ protected void onCreate(Bundle savedInstanceState, View view) {
logs = SuperuserDatabaseHelper.getLogs(getActivity(), up, -1);
}
else {
setEmpty(R.string.no_logs);
TextView empty = (TextView)getLayoutInflater(savedInstanceState).inflate(R.layout.empty, null);
((ViewGroup)view.findViewById(R.id.empty)).addView(empty);
empty.setText(R.string.no_logs);
view.findViewById(R.id.policy_header).setVisibility(View.GONE);
logs = SuperuserDatabaseHelper.getLogs(getActivity());
}
@@ -34,7 +34,9 @@
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.koushikdutta.superuser.db.LogEntry;
import com.koushikdutta.superuser.db.SuDatabaseHelper;
@@ -96,7 +98,9 @@ public void onCreate(Bundle savedInstanceState, View view) {
setHasOptionsMenu(true);
setEmpty(R.string.no_apps);
TextView empty = (TextView)getLayoutInflater(savedInstanceState).inflate(R.layout.empty, null);
((ViewGroup)view.findViewById(R.id.empty)).addView(empty);
empty.setText(R.string.no_apps);
load();

0 comments on commit 3a25d68

Please sign in to comment.