Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KapilYadav-dev committed Nov 14, 2020
0 parents commit b043cca
Show file tree
Hide file tree
Showing 48 changed files with 1,036 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Censory/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
38 changes: 38 additions & 0 deletions Censory/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
plugins {
id 'com.android.library'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"

defaultConfig {
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Empty file added Censory/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions Censory/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package in.kay.censory;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("in.kay.censory.test", appContext.getPackageName());
}
}
5 changes: 5 additions & 0 deletions Censory/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="in.kay.censory">

</manifest>
25 changes: 25 additions & 0 deletions Censory/src/main/java/in/kay/censory/CensoryLibrary.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package in.kay.censory;

import android.content.Context;

import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;

public class CensoryLibrary {
public String defaultCensor(String string, Context context) {
List<String> words = Arrays.asList(context.getResources().getStringArray(R.array.censored));
for (String word : words) {
Pattern rx = Pattern.compile("\\b" + word + "\\b", Pattern.CASE_INSENSITIVE);
string = rx.matcher(string).replaceAll(new String(new char[word.length()]).replace('\0', '*'));
}
return string;
}
public String customCensor(String string, List<String> list) {
for (String word : list) {
Pattern rx = Pattern.compile("\\b" + word + "\\b", Pattern.CASE_INSENSITIVE);
string = rx.matcher(string).replaceAll(new String(new char[word.length()]).replace('\0', '*'));
}
return string;
}
}
100 changes: 100 additions & 0 deletions Censory/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="censored">
<item>anal</item>
<item>anus</item>
<item>arse</item>
<item>ass</item>
<item>ass fuck</item>
<item>ass hole</item>
<item>assfucker</item>
<item>asshole</item>
<item>assshole</item>
<item>bastard</item>
<item>bitch</item>
<item>black cock</item>
<item>bloody hell</item>
<item>boong</item>
<item>cock</item>
<item>cockfucker</item>
<item>cocksuck</item>
<item>cocksucker</item>
<item>coon</item>
<item>coonnass</item>
<item>crap</item>
<item>cunt</item>
<item>cyberfuck</item>
<item>damn</item>
<item>darn</item>
<item>dick</item>
<item>douche</item>
<item>dummy</item>
<item>erect</item>
<item>erection</item>
<item>erotic</item>
<item>escort</item>
<item>fag</item>
<item>faggot</item>
<item>fuck</item>
<item>Fuck off</item>
<item>fuck you</item>
<item>fuckass</item>
<item>fuckhole</item>
<item>god damn</item>
<item>gook</item>
<item>hard core</item>
<item>hardcore</item>
<item>homoerotic</item>
<item>hore</item>
<item>lesbian</item>
<item>lesbians</item>
<item>mother fucker</item>
<item>motherfuck</item>
<item>motherfucker</item>
<item>negro</item>
<item>nigger</item>
<item>orgasim</item>
<item>orgasm</item>
<item>penis</item>
<item>penisfucker</item>
<item>piss</item>
<item>piss off</item>
<item>porn</item>
<item>porno</item>
<item>pornography</item>
<item>pussy</item>
<item>retard</item>
<item>sadist</item>
<item>sex</item>
<item>sexy</item>
<item>shit</item>
<item>slut</item>
<item>son of a bitch</item>
<item>suck</item>
<item>tits</item>
<item>viagra</item>
<item>whore</item>
<item>xxx</item>
<item>chutiya</item>
<item>Maderchod</item>
<item>Bhosadike</item>
<item>Bhenchod</item>
<item>Betichod</item>
<item>Bhadhava</item>
<item>Chodu</item>
<item>Choot</item>
<item>Chut</item>
<item>Chutiya</item>
<item>Gaand</item>
<item>Gaandu</item>
<item>Bakland</item>
<item>Lauda</item>
<item>Lodu</item>
<item>Lund</item>
<item>Hijra</item>
<item>Kuttiya</item>
<item>Randi</item>
<item>Saala</item>
<item>Jhat</item>
</string-array>
</resources>
17 changes: 17 additions & 0 deletions Censory/src/test/java/in/kay/censory/ExampleUnitTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package in.kay.censory;

import org.junit.Test;

import static org.junit.Assert.*;

/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
42 changes: 42 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
plugins {
id 'com.android.application'
}
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.KapilYadav-dev'

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"

defaultConfig {
applicationId "in.kay.library"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Loading

0 comments on commit b043cca

Please sign in to comment.