Skip to content
Open
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
20 changes: 2 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ subprojects {
spotless {
kotlin {
ktfmt(libs.ktfmt.get().version).googleStyle()
target('**/*.kt')
target('src/**/*.kt')
}
}

Expand All @@ -35,6 +35,7 @@ subprojects {
}
}
compilerOptions {
allWarningsAsErrors = true
jvmTarget = JvmTarget.JVM_11
freeCompilerArgs = [
"-progressive",
Expand All @@ -48,21 +49,4 @@ subprojects {
tasks.withType(JavaCompile).configureEach {
options.release = 11
}

configurations.configureEach {
resolutionStrategy.eachDependency {
if (requested.group == "com.android.tools.build" && requested.name == "aapt2-proto") {
useVersion(libs.versions.aapt2Proto.get())
because("We need to keep depenedencies in sync with bundletool")
}
if (requested.group == "com.google.protobuf" && requested.name == "protobuf-java") {
useVersion(libs.versions.protobufJava.get())
because("We need to keep depenedencies in sync with bundletool")
}
if (requested.group == "com.google.guava" && requested.name == "guava") {
useVersion(libs.versions.guava.get())
because("We need to keep depenedencies in sync with bundletool")
}
}
}
Comment on lines -52 to -67
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very sure about this, but seems no hard to do so.

\--- project :formats
      +--- com.android.tools.apkparser:binary-resources:32.1.0
-     |    \--- com.google.guava:guava:33.3.1-jre -> 30.1-jre
-     |         +--- com.google.guava:failureaccess:1.0.1
-     |         +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
-     |         +--- com.google.code.findbugs:jsr305:3.0.2
-     |         +--- org.checkerframework:checker-qual:3.5.0
-     |         +--- com.google.errorprone:error_prone_annotations:2.3.4 -> 2.11.0
-     |         \--- com.google.j2objc:j2objc-annotations:1.3
+     |    \--- com.google.guava:guava:33.3.1-jre
+     |         +--- com.google.guava:failureaccess:1.0.2
+     |         +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+     |         +--- com.google.code.findbugs:jsr305:3.0.2
+     |         +--- org.checkerframework:checker-qual:3.43.0
+     |         +--- com.google.errorprone:error_prone_annotations:2.28.0
+     |         \--- com.google.j2objc:j2objc-annotations:3.0.0
      \--- com.android.tools.build:bundletool:1.18.3
-          +--- com.google.errorprone:error_prone_annotations:2.3.1 -> 2.11.0
+          +--- com.google.errorprone:error_prone_annotations:2.3.1 -> 2.28.0
-          +--- com.google.guava:guava:32.0.1-jre -> 30.1-jre (*)
+          +--- com.google.guava:guava:32.0.1-jre -> 33.3.1-jre (*)
           \--- com.google.protobuf:protobuf-java-util:3.22.3
-               +--- com.google.errorprone:error_prone_annotations:2.11.0
+               +--- com.google.errorprone:error_prone_annotations:2.11.0 -> 2.28.0
-               +--- com.google.guava:guava:31.1-jre -> 30.1-jre (*)
+               +--- com.google.guava:guava:31.1-jre -> 33.3.1-jre (*)
-               \--- com.google.j2objc:j2objc-annotations:1.3
+               \--- com.google.j2objc:j2objc-annotations:1.3 -> 3.0.0

}
4 changes: 2 additions & 2 deletions diffuse/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ buildConfig {
}

// A zip and tar are configured by default. We don't care about tar.
tasks.named('distTar').configure { task ->
tasks.named('distTar') { task ->
task.enabled = false
}

// Build an exploded application directory by default for local testing.
tasks.named('assemble').configure { task ->
tasks.named('assemble') { task ->
task.dependsOn(tasks.named('installDist'))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class ApiMapping private constructor(private val typeMappings: Map<TypeDescripto
}
}
if (fromDescriptor != null) {
typeMappings[toDescriptor!!] = TypeMapping(fromDescriptor!!, fields!!, methods!!)
typeMappings[toDescriptor!!] = TypeMapping(fromDescriptor, fields!!, methods!!)
}
return ApiMapping(typeMappings)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private fun AndroidDex.getMethod(methodId: MethodId): Method {
val declaringType = TypeDescriptor(typeNames()[methodId.declaringClassIndex])
val name = strings()[methodId.nameIndex]
val methodProtoIds = protoIds()[methodId.protoIndex]
@OptIn(ExperimentalUnsignedTypes::class)
val parameterTypes =
readTypeList(methodProtoIds.parametersOffset).types.asUShortArray().map {
TypeDescriptor(typeNames()[it.toInt()])
Expand Down
15 changes: 10 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
org.gradle.caching=true
org.gradle.configuration-cache=true
org.gradle.configuration-cache.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx4g
org.gradle.parallel=true
org.gradle.tooling.parallel=true

########## Properties for publishing to Maven Central ##########

GROUP=com.jakewharton.diffuse
VERSION_NAME=0.4.0-SNAPSHOT

Expand All @@ -8,17 +17,13 @@ POM_SCM_URL=https://github.com/JakeWharton/diffuse/
POM_SCM_CONNECTION=scm:git:git://github.com/JakeWharton/diffuse.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/JakeWharton/diffuse.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_NAME=Apache-2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=jakewharton
POM_DEVELOPER_NAME=Jake Wharton

org.gradle.caching=true
org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
org.gradle.parallel=true

mavenCentralPublishing=true
mavenCentralAutomaticPublishing=true
signAllPublications=true
8 changes: 2 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
[versions]
# Keep this values in sync with bundletool"s dependencies.
aapt2Proto = "9.1.0-14792394"
protobufJava = "4.34.1"
guava = "30.1-jre"

[libraries]
dalvikDx = "com.jakewharton.android.repackaged:dalvik-dx:16.0.1"
binaryResources = "com.android.tools.apkparser:binary-resources:32.1.0"
apkSigner = "com.android.tools.build:apksig:9.1.0"
bundleTool = "com.android.tools.build:bundletool:1.18.3"
aapt2Proto = { module = "com.android.tools.build:aapt2-proto", version.ref = "aapt2Proto" }
protobufJava = { module = "com.google.protobuf:protobuf-java", version.ref = "protobufJava" }
aapt2Proto = "com.android.tools.build:aapt2-proto:9.1.0-14792394"
protobufJava = "com.google.protobuf:protobuf-java:4.34.1"
clikt = "com.github.ajalt.clikt:clikt:5.1.0"
junit = "junit:junit:4.13.2"
assertk = "com.willowtreeapps.assertk:assertk:0.28.1"
Expand Down
9 changes: 4 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
pluginManagement {
dependencyResolutionManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
repositories {
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
Expand All @@ -13,6 +11,7 @@ dependencyResolutionManagement {
}
}

enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

rootProject.name = 'diffuse-root'
Expand Down