Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

update gradle build tools and gradle version used #1000

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ android {
* Update (both Gradle and local SDK) whenever possible
*/
compileSdkVersion 27
buildToolsVersion '27.0.3'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be set to buildToolsVersion "28.0.3"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See comment below 👍


/**
* Build configurations for APK
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
1 change: 0 additions & 1 deletion openCVLibrary330/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be set to buildToolsVersion "28.0.3"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, as mentioned in the PR description the new gradle build tools have their own internal default for android.buildToolsVersion. For gradle build tools 3.2.1 that default is 28.0.*. Not specifying this is fine and reduces the overhead to keeping an app up to date - keep gradle build tools up to date and you'll be up to date with android build tools too


defaultConfig {
minSdkVersion 19
Expand Down
5 changes: 1 addition & 4 deletions openCVLibrary330/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv"
android:versionCode="3300"
android:versionName="3.3.0">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="21" />
</manifest>
android:versionName="3.3.0" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change is a bit unrelated to the topic of this PR but it's OK.
Next time I'd put it, at least, in a separate commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not, as mentioned in the PR description build tools 3.2.1 added a bunch of warnings and errors. One was an error when SDK versions are specified in the manifest. If I remember right it actually only errors on targetSdkVersion and minSdkVersion was a warning but I figured removing one would be a less clear change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I split it out anyone into #1006, if that gets merged first I'll rebase this branch 👍