Skip to content

Commit

Permalink
migrate to built-in gradle dependency verification
Browse files Browse the repository at this point in the history
closes #693
  • Loading branch information
ialokim committed Jun 1, 2021
1 parent fb7682f commit c8034bf
Show file tree
Hide file tree
Showing 6 changed files with 2,599 additions and 225 deletions.
2 changes: 0 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'witness'
apply from: 'witness.gradle'

android {

Expand Down
Binary file removed app/libs/gradle-witness.jar
Binary file not shown.
219 changes: 0 additions & 219 deletions app/witness.gradle

This file was deleted.

1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath files('app/libs/gradle-witness.jar')
}

}
Expand Down
2,594 changes: 2,594 additions & 0 deletions gradle/verification-metadata.xml

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions update-dependency-pinning.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

WITNESS=app/witness.gradle
# this will just append new checksums and not remove unnecessary ones

echo "" > $WITNESS
./gradlew -q calculateChecksums | grep -Ev "^(Skipping|Verifying)" | grep -Ev "files-2.1:|caches:transforms-3:|:build-tools:core-lambda-stubs.jar:|:platforms:android.jar:|-linux.jar:" > $WITNESS
# to clean up the file, remove ./gradle/verification-metadata.xml,
# run the command below and manually (re-)add checksums for missing operating systems windows, osx or linux for aapt2
# checksums can be computed after downloading the respective jars of https://maven.google.com/web/index.html?q=aapt2#com.android.tools.build:aapt2

./gradlew --write-verification-metadata sha256 build

0 comments on commit c8034bf

Please sign in to comment.