Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development : v1.2.0 #87

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ dependencies {
// GooglePlay API
implementation("com.google.protobuf:protobuf-java:3.18.1")
api("com.github.theapache64:google-play-api:0.0.9")

// SnakeYAML : YAML 1.1 parser and emitter for Java
implementation("org.yaml:snakeyaml:1.29")
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
Expand Down
19 changes: 0 additions & 19 deletions data/src/main/kotlin/brut/androlib/meta/MetaInfo.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ interface AnalysisReportDefinition {
val appName: String?
val packageName: String
val platform: Platform
val libraries: List<Library>
val appLibs: List<Library>
val transitiveLibs: List<Library>
val untrackedLibraries: Set<String>
val apkSizeInMb: Float
val assetsDir: File?
Expand All @@ -23,7 +24,8 @@ class AnalysisReport(
override val appName: String?,
override val packageName: String,
override val platform: Platform,
override val libraries: List<Library>,
override val appLibs: List<Library>,
override val transitiveLibs: List<Library>,
override val untrackedLibraries: Set<String>,
override val apkSizeInMb: Float,
override val assetsDir: File?,
Expand All @@ -37,7 +39,8 @@ fun AnalysisReport.toResult(resultsRepo: ResultsRepo, config: Config? = null, lo
return Result(
appName = this.appName ?: this.packageName,
packageName = this.packageName,
libPackages = this.libraries.joinToString(",") { it.packageName },
appLibs = this.appLibs.joinToString(",") { it.packageName },
transitiveLibs = this.transitiveLibs.joinToString(",") { it.packageName },
versionName = this.gradleInfo.versionName ?: "Unknown",
versionCode = this.gradleInfo.versionCode ?: -1,
platform = this.platform::class.simpleName!!,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.theapache64.stackzy.data.local

import com.theapache64.stackzy.data.remote.Library

data class LibResult(
var appLibs: Set<Library>,
var transitiveDeps: Set<Library>,
val untrackedLibs: Set<String>,
)
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ interface ApiInterface {
@Query("stackzy_lib_version") stackzyLibVersion: Int,
): Flow<Resource<Result>>

@Read("SELECT * WHERE lib_packages contains :lib_package AND package_name != 'com.theapache64.test.app' ORDER BY created_at DESC")
@Read("SELECT * WHERE app_libs contains :lib_package AND package_name != 'com.theapache64.test.app' ORDER BY created_at DESC")
@GET(NetworkModule.TABLE_RESULTS)
fun getResults(
@Query("lib_package") libPackageName: String,
@Query("app_lib") appLib: String,
): Flow<Resource<List<Result>>>

@Read("SELECT lib_packages WHERE lib_packages != '' && package_name != 'com.theapache64.test.app'")
@Read("SELECT app_libs WHERE app_libs != '' && package_name != 'com.theapache64.test.app'")
@GET(NetworkModule.TABLE_RESULTS)
fun getAllLibPackages(): Flow<Resource<List<OptionalResult>>>
fun getAllAppLibs(): Flow<Resource<List<OptionalResult>>>

@Read("SELECT * WHERE package_name = :package_name AND version_code != :except_v_code ORDER BY created_at DESC LIMIT 1")
@GET(NetworkModule.TABLE_RESULTS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
data class OptionalResult(
@Json(name = "lib_packages")
val libPackages: String?,
@Json(name = "app_libs")
val appLibs: String?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import com.squareup.moshi.JsonClass
data class Result(
@Json(name = "app_name")
val appName: String,
@Json(name = "lib_packages")
val libPackages: String?,
@Json(name = "app_libs")
val appLibs: String?,
@Json(name = "transitive_libs")
val transitiveLibs: String?,
@Json(name = "package_name")
val packageName: String, // comma-sep
@Json(name = "version_code")
Expand Down
Loading