Skip to content

Commit

Permalink
准备发布到 jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoukewen committed Sep 29, 2019
1 parent 0336dd4 commit 383b781
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 36 deletions.
61 changes: 45 additions & 16 deletions adi/adi_lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'maven'
apply plugin: 'com.github.dcendents.android-maven'// for jitpack
//apply plugin: 'maven'

group = "zkw.adi"
archivesBaseName = "adi"
version = '0.9.1'
uploadArchives {
doFirst {
System.out.println("============uploadArchives for local: $version")
}
repositories {
mavenDeployer {
repository(url: mavenLocal().url)
}
}
finalizedBy(clean)
repositories {
mavenCentral()
google()
jcenter()
maven { url "https://jitpack.io" }
}

group = "com.github.zkwlx"
version = '0.9.1'
//uploadArchives {
// doFirst {
// System.out.println("============uploadArchives for local: $version")
// }
// repositories {
// mavenDeployer {
// repository(url: mavenLocal().url)
// }
// }
// finalizedBy(clean)
//}

android {
compileSdkVersion 28

Expand Down Expand Up @@ -67,6 +74,28 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()

task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

task classesJar(type: Jar) {
from "$buildDir/intermediates/classes/release"
}

artifacts {
archives classesJar
archives javadocJar
archives sourcesJar
}
18 changes: 0 additions & 18 deletions adi/adi_lib/src/main/java/com/adi/ui/ADIFloatManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.adi.ui
import android.annotation.TargetApi
import android.app.Activity
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.provider.Settings
import android.text.InputType
Expand Down Expand Up @@ -116,21 +115,4 @@ object ADIFloatManager {
}
}

private const val PERMISSIONS_REQUEST_CODE = 10086
private val PERMISSIONS = arrayOf(
"android.permission.SYSTEM_ALERT_WINDOW"
)

fun verifyAllPermissions(activity: Activity) {
val tempPermissions = mutableListOf<String>()
PERMISSIONS.forEach { permission ->
val result = activity.checkSelfPermission(permission)
if (result != PackageManager.PERMISSION_GRANTED) {
tempPermissions.add(permission)
}
}
activity.requestPermissions(tempPermissions.toTypedArray(), PERMISSIONS_REQUEST_CODE)

}

}
5 changes: 4 additions & 1 deletion adi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ buildscript {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"


// for jitpack
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -23,6 +24,8 @@ allprojects {
mavenLocal()
google()
jcenter()
// for jitpack
maven { url "https://jitpack.io"}
}
}

Expand Down
2 changes: 1 addition & 1 deletion adi_analyze/adi_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from handler.ThreadStartHandler import ThreadStartHandler
from plot.BokehPlotMaker import BokehPlotMaker

FILE_NAME = "adi_15.log"
FILE_NAME = "depth50_object.log"

# TODO 在这里配置需要解析的 Event
handlerList = [ObjectAllocHandler(),
Expand Down

0 comments on commit 383b781

Please sign in to comment.