Skip to content

Commit

Permalink
Misc cleanups (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers authored Jan 5, 2021
1 parent 129059f commit 4e4e017
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_instrumentation_tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

AGP_VERSION=$1
ENABLE_TRACEREFS=$1
ENABLE_TRACEREFS=$2

function printthreads {
echo "Thread dump"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildscript {
String defaultAgpVersion = "4.0.0"
String agpVersion = findProperty("keeperTest.agpVersion")?.toString() ?: defaultAgpVersion
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21"
classpath "com.android.tools.build:gradle:$agpVersion"
classpath "com.slack.keeper:keeper"
}
Expand Down
24 changes: 24 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,27 @@ keeper {
enableL8RuleSharing = true
}
```

## TraceReferences

!!! warning "Heads up!"
TraceReferences is still experimental. Before reporting issues, please check if it's an issue with Keeper or TraceReferences itself before filing. If it's an issue with TraceReferences, please file on the Android issue tracker instead: https://issuetracker.google.com/issues/new?component=326788

`TraceReferences` is a new tool for generating Proguard rules based on one jar's usage of classes
in another jar. It is the formal successor and long-term replacement for the current `PrintUses` CLI
that Keeper currently uses.

```kotlin
keeper {
traceReferences {
// Invoking this enables it!

// Optional: extra arguments to pass to TraceReferences
arguments.set(listOf("--map-diagnostics:MissingDefinitionsDiagnostic", "error", "info"))
}
}
```

Note that this uses the R8 version controlled by the R8 version defined by the `keeperR8` version.
If you want to change it, set the version in `keeperR8` to whichever version you want (must be
higher than `3.0.9-dev`).
8 changes: 4 additions & 4 deletions keeper-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import java.net.URL
plugins {
`kotlin-dsl`
`java-gradle-plugin`
kotlin("jvm") version "1.4.20"
kotlin("kapt") version "1.4.20"
kotlin("jvm") version "1.4.21"
kotlin("kapt") version "1.4.21"
id("org.jetbrains.dokka") version "1.4.20"
id("com.vanniktech.maven.publish") version "0.13.0"
}
Expand Down Expand Up @@ -113,8 +113,8 @@ val agpVersion = findProperty("keeperTest.agpVersion")?.toString() ?: defaultAgp
// See https://github.com/slackhq/keeper/pull/11#issuecomment-579544375 for context
val releaseMode = hasProperty("keeper.releaseMode")
dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.4.20")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.4.21")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")

if (releaseMode) {
compileOnly("com.android.tools.build:gradle:$defaultAgpVersion")
Expand Down
9 changes: 3 additions & 6 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
if [[ "$1" = "--snapshot" ]]; then snapshot=true; fi
if [[ "$1" = "--local" ]]; then local=true; fi

cd keeper-gradle-plugin || exit
if ! [[ ${local} ]]; then
./gradlew clean uploadArchives --no-daemon --no-parallel -Pkeeper.releaseMode=true
./gradlew -p keeper-gradle-plugin clean uploadArchives --no-daemon --no-parallel -Pkeeper.releaseMode=true
if ! [[ ${snapshot} ]]; then
./gradlew closeAndReleaseRepository
./gradlew -p keeper-gradle-plugin closeAndReleaseRepository
fi
else
./gradlew clean install --no-daemon --no-parallel -Pkeeper.releaseMode=true
./gradlew -p keeper-gradle-plugin clean install --no-daemon --no-parallel -Pkeeper.releaseMode=true
fi

cd ..

0 comments on commit 4e4e017

Please sign in to comment.