forked from devzwy/open_nsfw_android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
赵文文
committed
Oct 15, 2020
1 parent
d8125dc
commit 892cc69
Showing
77 changed files
with
689 additions
and
1,949 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'kotlin-kapt' | ||
android { | ||
compileSdkVersion 30 | ||
buildToolsVersion "30.0.2" | ||
|
||
defaultConfig { | ||
applicationId "com.zww.sample" | ||
minSdkVersion 21 | ||
targetSdkVersion 30 | ||
versionCode 136 | ||
versionName "1.3.6" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
debug { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
aaptOptions { | ||
noCompress "tflite" | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: "libs", include: ["*.jar"]) | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
implementation 'androidx.core:core-ktx:1.3.1' | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1' | ||
implementation project(path: ':initializer') | ||
implementation project(path: ':nsfw') | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | ||
|
||
//权限 | ||
implementation 'com.yanzhenjie:permission:2.0.3' | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.zww.sample | ||
|
||
import android.graphics.BitmapFactory | ||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import com.zwy.nsfw.getNSFWScore | ||
import java.util.* | ||
|
||
class MainActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_main) | ||
|
||
resources.assets.also { asset -> | ||
asset.list("img")?.forEach { | ||
"img/$it".also { assetFilePath -> | ||
val startTime = Date().time | ||
BitmapFactory.decodeStream(asset.open(assetFilePath)).also { | ||
it.getNSFWScore() | ||
it.recycle() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
</LinearLayout> |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: "guru.stefma.bintrayrelease" | ||
android { | ||
compileSdkVersion 30 | ||
buildToolsVersion "30.0.2" | ||
|
||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 30 | ||
versionCode 136 | ||
versionName "1.3.6" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles "consumer-rules.pro" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: "libs", include: ["*.jar"]) | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
implementation 'androidx.core:core-ktx:1.3.2' | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
api project(path: ':nsfw') | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | ||
|
||
} | ||
|
||
version = "1.3.6" | ||
group = "com.zwy.nsfw_initializer" | ||
publish { | ||
userOrg = 'devzwy' | ||
repoName = 'maven' | ||
artifactId = 'com.zwy.nsfw_initializer' | ||
desc = 'android端离线鉴黄库快速初始化库' | ||
website = 'https://github.com/devzwy' | ||
} | ||
|
||
tasks.withType(Javadoc) {//防止编码问题 | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
options.addStringOption('encoding', 'UTF-8') | ||
options.addStringOption('charSet', 'UTF-8') | ||
} |
Empty file.
Oops, something went wrong.