Skip to content

Fixed support for Gradle < 8.2 #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

shanshin
Copy link
Contributor

Fixes #263

@shanshin shanshin requested a review from ALikhachev July 31, 2024 13:28
@shanshin shanshin force-pushed the fix-support-old-gardle branch from 7d0caff to 7d9038b Compare July 31, 2024 13:29
Comment on lines +650 to +658
private fun Project.isGradle8Dot2OrHigher(): Boolean {
val parts = gradle.gradleVersion.split('.')
if (parts.size < 2) return false
val major = parts[0].toIntOrNull() ?: return false
val minor = parts[1].toIntOrNull() ?: return false
if (major < 8) return false
if (major == 8 && minor < 2) return false
return true
}

Choose a reason for hiding this comment

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

See #265 which uses Gradle's GradleVersion API that obviates the need to do any manual version parsing like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, thanks, missed that PR

@shanshin shanshin closed this Jul 31, 2024
@shanshin shanshin deleted the fix-support-old-gardle branch August 2, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using version 0.16.2 in projects with a Gradle version older than 8.2
2 participants