Skip to content

Commit

Permalink
Enable crowdin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raycoms committed Dec 9, 2021
1 parent eae8149 commit 59abd17
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 96 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ src/main/generated/resources/.cache/cache
logs/
gradle/local.gradle

src/main/assets/minecolonies/lang
/src/main/resources/assets/minecolonies/lang/**
!src/main/assets/minecolonies/lang/manual_en_us.json

68 changes: 0 additions & 68 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,69 +1 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
mavenLocal()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath "gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0"
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.4.0"
classpath 'de.undercouch:gradle-download-task:4.1.2'
}
}

plugins {
id "org.sonarqube" version "3.0"
}

configurations.all {
resolutionStrategy {
force 'cpw.mods:securejarhandler:0.9.50'
}
}

apply from: 'https://raw.githubusercontent.com/ldtteam/OperaPublicaCreator/main/gradle/mod.gradle'
apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle'

configurations {
library
implementation.extendsFrom library
}

minecraft.runs.all {
lazyToken('minecraft_classpath') {
configurations.library.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
}
}

dependencies {
implementation fg.deobf("mezz.jei:jei-${project.minecraftVersion}:${project.jei_version}")

apiImplementation fg.deobf("com.ldtteam:blockui:${project.minecraftVersion}-${project.blockUI_version}"){
transitive = false
}
implementation fg.deobf("com.ldtteam:blockui:${project.minecraftVersion}-${project.blockUI_version}"){
transitive = false
}

apiImplementation fg.deobf("com.ldtteam:structurize:${project.minecraftVersion}-${project.structurize_version}"){
transitive = false
}
implementation fg.deobf("com.ldtteam:structurize:${project.minecraftVersion}-${project.structurize_version}"){
transitive = false
}

implementation fg.deobf("com.ldtteam:multi-piston:${project.exactMinecraftVersion}-${project.multiPistonVersion}"){
transitive = false
}

datagenLibrary ("com.ldtteam:datagenerators:${project.dataGeneratorsVersion}"){
transitive = false
}
library ("com.ldtteam:datagenerators:${project.dataGeneratorsVersion}") {
transitive = false
}
}
17 changes: 14 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ curseId=245506
usesCurse=true
requiredCurseDependencies=structurize;domum-ornamentum;blockui;multi-piston

usesCrowdin=false
crowdinId=minecolonies

usesDatagen=true
usesOptifine=false
useDefaultTestSystem=false
Expand All @@ -58,3 +55,17 @@ isFMLLibrary=false

mainExcludedResources=assets/minecolonies/lang/default.json
mainIncludedResources=src/main/generated/resources

usesMergableTranslations=true
translationMergeSources[0]=src/main/resources/assets/minecolonies/lang/manual_en_us.json
translationMergeSources[1]=src/main/generated/resources/assets/minecolonies/lang/default.json
translationMergeDestination=src/main/resources/assets/minecolonies/lang/en_us.json

usesSonarQube=true

usesCrowdInTranslationManagement=true
crowdInDownloadDirectory=src/main/resources/assets/minecolonies/lang
#usesCrowdInBuildingWithFilteredBranches=true
#usesCrowdInUploadWithFilteredBranches=true

crowdInApiKey=380ea29f53084bf4561627242608e087f781013c168152823890d430b96baf3f84597cffe9acc2b5
12 changes: 12 additions & 0 deletions gradle/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
projects:
- id: 294861
sources:
- dir: "%crowdin_download_path%"
crowdinPath:
dir: "/lang"
filename: "en_us.json"
exportPattern:
dir: "/lang"
filename: "%locale_with_underscore%.json"
includes:
- pattern: "en_us.json"
33 changes: 24 additions & 9 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
mavenLocal()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}

dependencies {
apiCompileOnly fg.deobf("com.ldtteam:domum_ornamentum:${project.exactMinecraftVersion}-${project.domumOrnamentumVersion}:universal"){
transitive = false
Expand All @@ -17,4 +8,28 @@ dependencies {
runtimeOnly fg.deobf("com.ldtteam:domum_ornamentum:${project.exactMinecraftVersion}-${project.domumOrnamentumVersion}:universal"){
transitive = false
}
implementation fg.deobf("mezz.jei:jei-${project.minecraftVersion}:${project.jei_version}"){
transitive = false
}
apiImplementation fg.deobf("com.ldtteam:blockui:${project.minecraftVersion}-${project.blockUI_version}"){
transitive = false
}
implementation fg.deobf("com.ldtteam:blockui:${project.minecraftVersion}-${project.blockUI_version}"){
transitive = false
}
apiImplementation fg.deobf("com.ldtteam:structurize:${project.minecraftVersion}-${project.structurize_version}"){
transitive = false
}
implementation fg.deobf("com.ldtteam:structurize:${project.minecraftVersion}-${project.structurize_version}"){
transitive = false
}
implementation fg.deobf("com.ldtteam:multi-piston:${project.exactMinecraftVersion}-${project.multiPistonVersion}"){
transitive = false
}
datagenLibrary ("com.ldtteam:datagenerators:${project.dataGeneratorsVersion}"){
transitive = false
}
library ("com.ldtteam:datagenerators:${project.dataGeneratorsVersion}"){
transitive = false
}
}
15 changes: 0 additions & 15 deletions gradle/lang.gradle

This file was deleted.

0 comments on commit 59abd17

Please sign in to comment.