Skip to content

Commit

Permalink
Reverted compile/target sdk int for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Deniz Veli committed Jan 2, 2014
1 parent 7736eb7 commit 15eeb6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ dependencies {
}

android {
compileSdkVersion 19
compileSdkVersion 17
buildToolsVersion "19"

defaultConfig {
minSdkVersion 10
targetSdkVersion 19
targetSdkVersion 17
}
}

Expand Down

5 comments on commit 15eeb6b

@EddieRingle
Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly are you trying to remain backwards-compatible with here? You should always target the latest SDK version available.

@meoyawn
Copy link

@meoyawn meoyawn commented on 15eeb6b Jan 5, 2014

Choose a reason for hiding this comment

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

same here, how can this help? is there any secret?

@denizmveli
Copy link
Contributor

Choose a reason for hiding this comment

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

"You should always target the latest SDK version available."

I disagree with this point but that's an aside.

There is a gradle issue which prevents libraries from being used in an app where the libs targetSDKVersion is higher then the apps value. So 1.0.1 introduced a regression stopping AndroidStaggeredGrid from being usable in projects that didn't target SDK 19 e.g. the Etsy app and any other users of 1.0.0 with the same setup.

However this change doesn't stop you from targeting >17 in your app. The sample app is set to 19.

Lastly, I don't think the "library" should define the targetSDKVersion at all. I'm going to remove it but I have to find some time to test it.

@EddieRingle
Copy link
Contributor

Choose a reason for hiding this comment

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

I disagree with this point but that's an aside.

I'd like to hear your reasoning, as the Gradle issue you mentioned becomes irrelevant if you are targeting the latest API level (both in libraries and the application). The documentation for the targetSdkVersion attribute specifically recommends that you increase the value for your application as new versions of Android are released.

@denizmveli
Copy link
Contributor

Choose a reason for hiding this comment

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

That documentation is specifically talking about applications. However it is not this libs job to enforce that OR to prevent it.

Whenever you're upgrading any software you should ask yourself questions like - is this required? what is the gain? what are the risks? how much time is needed for testing / QA? etc.

Again this change to the lib doesn't prevent anyone targeting >17 in their app.

Please sign in to comment.