Skip to content

Commit f1ee5eb

Browse files
committed
Add fix for null results to all API calls. Bump dependencies
1 parent 96bf357 commit f1ee5eb

File tree

11 files changed

+221
-110
lines changed

11 files changed

+221
-110
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3434
### Security
3535
- No security issues fixed!
3636

37+
## [3.3.0] - 2023-03-20
38+
### Changed
39+
- Bump project dependencies
40+
- Project is now compiled against Java 11
41+
### Fixed
42+
- Fix unexpected plug-in crash when PoEditor responses return no result. _Thanks to [@MartinakDaniel](https://github.com/MartinakDaniel) for the contribution!_
43+
3744
## [3.2.0] - 2023-01-22
3845
### Added
3946
- Add option to unquote strings via export API
@@ -429,7 +436,8 @@ res_dir_path -> resDirPath
429436
### Added
430437
- Initial release.
431438

432-
[Unreleased]: https://github.com/hyperdevs-team/poeditor-android-gradle-plugin/compare/3.2.0...HEAD
439+
[Unreleased]: https://github.com/hyperdevs-team/poeditor-android-gradle-plugin/compare/3.3.0...HEAD
440+
[3.3.0]: https://github.com/hyperdevs-team/poeditor-android-gradle-plugin/compare/3.1.0...3.3.0
433441
[3.2.0]: https://github.com/hyperdevs-team/poeditor-android-gradle-plugin/compare/3.1.0...3.2.0
434442
[3.1.1]: https://github.com/hyperdevs-team/poeditor-android-gradle-plugin/compare/3.1.0...3.1.1
435443
[3.1.0]: https://github.com/hyperdevs-team/poeditor-android-gradle-plugin/compare/3.0.1...3.1.0

build.gradle.kts

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18+
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
1819

1920
buildscript {
2021
repositories {
2122
mavenCentral()
22-
google().content {
23-
includeGroup("com.android")
24-
includeGroupByRegex("com\\.android\\..*")
25-
includeGroupByRegex("com\\.google\\..*")
26-
includeGroupByRegex("androidx\\..*")
27-
}
23+
google()
2824
}
2925

3026
dependencies {
@@ -39,16 +35,14 @@ plugins {
3935
`maven-publish`
4036
alias(libs.plugins.detekt)
4137
alias(libs.plugins.gitVersionGradle)
38+
alias(libs.plugins.versionsUpdate)
4239
}
4340

41+
apply(plugin = libs.plugins.versionsUpdate.get().pluginId)
42+
4443
repositories {
4544
mavenCentral()
46-
google().content {
47-
includeGroup("com.android")
48-
includeGroupByRegex("com\\.android\\..*")
49-
includeGroupByRegex("com\\.google\\..*")
50-
includeGroupByRegex("androidx\\..*")
51-
}
45+
google()
5246
}
5347

5448
dependencies {
@@ -70,8 +64,8 @@ dependencies {
7064
}
7165

7266
java {
73-
sourceCompatibility = JavaVersion.VERSION_1_8
74-
targetCompatibility = JavaVersion.VERSION_1_8
67+
sourceCompatibility = JavaVersion.VERSION_11
68+
targetCompatibility = JavaVersion.VERSION_11
7569

7670
withJavadocJar()
7771
withSourcesJar()
@@ -166,3 +160,18 @@ publishing {
166160
}
167161
}
168162
}
163+
164+
// https://github.com/ben-manes/gradle-versions-plugin
165+
// Disallow release candidates as upgradable versions from stable versions
166+
fun String.isNonStable(): Boolean {
167+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { toUpperCase().contains(it) }
168+
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
169+
val isStable = stableKeyword || regex.matches(this)
170+
return isStable.not()
171+
}
172+
173+
tasks.withType<DependencyUpdatesTask> {
174+
rejectVersionIf {
175+
candidate.version.isNonStable() && !currentVersion.isNonStable()
176+
}
177+
}

0 commit comments

Comments
 (0)