Skip to content

Commit

Permalink
feat: Strings-based projects support (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ authored Feb 1, 2024
1 parent 9c770ca commit 79509aa
Show file tree
Hide file tree
Showing 93 changed files with 3,640 additions and 1,231 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle
run: ./gradlew build buildPlugin verifyPlugin

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle
run: ./gradlew build buildPlugin verifyPlugin

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ files.1.excluded-target-languages=uk # For a specific filegroup, high priority
files.2.excluded-target-languages=fr # For a specific filegroup, high priority
```

To specify cleanup mode or update strings flags for Strings-based projects use `cleanup-mode` and `update-strings`:

```ini
files.1.cleanup-mode=true
files.1.update-strings=true
```

### Translations Upload Options

The below properties can be used to configure the import options to the uploaded translations
Expand Down
61 changes: 34 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.6.5'
id 'org.jetbrains.intellij' version '1.17.0'
id 'jacoco'
}

group 'com.crowdin.crowdin-idea'
version '1.6.3'

sourceCompatibility = 1.8
sourceCompatibility = '17'

repositories {
mavenCentral()
Expand All @@ -16,52 +16,59 @@ repositories {

dependencies {

compile 'org.projectlombok:lombok:1.18.10'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
implementation 'net.lingala.zip4j:zip4j:2.11.3'
implementation 'com.github.crowdin:crowdin-api-client-java:1.14.0'
implementation 'commons-io:commons-io:2.15.1'

testCompile group: 'junit', name: 'junit', version: '4.13.1'
compile group: 'net.lingala.zip4j', name: 'zip4j', version: '2.11.3'
compile 'com.github.crowdin:crowdin-api-client-java:1.12.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
// compile group: 'commons-io', name: 'commons-io', version: '2.6' //to run '2017.1.6' idea

testCompile('org.junit.jupiter:junit-jupiter:5.5.2')
testCompile('org.hamcrest:hamcrest:2.2')
testCompile('org.mockito:mockito-core:2.1.0')
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.mockito:mockito-core:2.1.0'
}

test {
useJUnitPlatform()
}

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
// version '2017.1.6' //current since-version //requires additional libraries
version '2019.2.3'
// version '2020.3.1' //current last version //requires 11 JDK to execute 'runIde'
plugins 'git4idea'
updateSinceUntilBuild false
version = '2022.3.3'
plugins = ['Git4Idea']
updateSinceUntilBuild = false
}
patchPluginXml {
changeNotes """
changeNotes = """
- Bugfixes"""
}

wrapper {
gradleVersion = '5.2.1'
gradleVersion = '8.5'
}

jacoco {
toolVersion = "0.8.5"
reportsDir = file("$buildDir/reports")
toolVersion = '0.8.10'
reportsDirectory = layout.buildDirectory.dir('reports')
}

//https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin-faq.html#jacoco-reports-0-coverage
test {
jacoco {
includeNoLocationClasses = true
excludes = ["jdk.internal.*"]
}
}

jacocoTestReport {
classDirectories.setFrom(instrumentCode)

reports {
xml.enabled true
csv.enabled false
xml.destination file("${buildDir}/coverage.xml")
xml.required = true
csv.required = false
xml.outputLocation = layout.buildDirectory.file('coverage.xml')
}

getExecutionData().setFrom("$buildDir/jacoco/test.exec")
getExecutionData().setFrom(layout.buildDirectory.file('jacoco/test.exec'))
}

jacocoTestCoverageVerification {
classDirectories.setFrom(instrumentCode)
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Mon May 04 14:47:45 EEST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 79509aa

Please sign in to comment.