Browse Source

Skip autostyle for other tasks.

pull/139/head
weisj 5 years ago
parent
commit
637a5d2498
  1. 2
      .github/workflows/documentation.yml
  2. 6
      .github/workflows/gradle.yml
  3. 4
      .github/workflows/libs.yml
  4. 16
      build.gradle.kts
  5. 0
      darklaf_cpp.eclipseformat.xml
  6. 17
      windows/build.gradle.kts

2
.github/workflows/documentation.yml

@ -49,7 +49,7 @@ jobs:
java-version: 11 java-version: 11
- uses: eskatos/gradle-command-action@v1 - uses: eskatos/gradle-command-action@v1
with: with:
arguments: :darklaf-core:makeDocumentation arguments: :darklaf-core:makeDocumentation -PskipAutostyle
- name: Upload documentation - name: Upload documentation
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

6
.github/workflows/gradle.yml

@ -44,7 +44,7 @@ jobs:
with: with:
java-version: 11 java-version: 11
- name: Build - name: Build
run: ./gradlew build run: ./gradlew build -PskipAutostyle
linux: linux:
name: Linux (Java 8) name: Linux (Java 8)
@ -58,7 +58,7 @@ jobs:
with: with:
java-version: 8 java-version: 8
- name: Build - name: Build
run: ./gradlew build run: ./gradlew build -PskipAutostyle
macos: macos:
name: macOS (Java 11) name: macOS (Java 11)
@ -72,4 +72,4 @@ jobs:
with: with:
java-version: 11 java-version: 11
- name: Build - name: Build
run: ./gradlew build run: ./gradlew build -PskipAutostyle

4
.github/workflows/libs.yml

@ -51,7 +51,7 @@ jobs:
with: with:
java-version: 11 java-version: 11
- name: Build - name: Build
run: ./gradlew :darklaf-windows:build run: ./gradlew :darklaf-windows:build -PskipAutostyle
- name: Upload x86 artifact - name: Upload x86 artifact
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
@ -75,7 +75,7 @@ jobs:
with: with:
java-version: 11 java-version: 11
- name: Build - name: Build
run: ./gradlew :darklaf-macos:build run: ./gradlew :darklaf-macos:build -PskipAutostyle
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

16
build.gradle.kts

@ -21,8 +21,8 @@ val skipAutostyle by props()
val String.v: String get() = rootProject.extra["$this.version"] as String val String.v: String get() = rootProject.extra["$this.version"] as String
val buildVersion = "darklaf".v + releaseParams.snapshotSuffix val buildVersion = "darklaf".v + releaseParams.snapshotSuffix
println("Building Darklaf $buildVersion") println("Building: Darklaf $buildVersion")
println(" JDK: " + System.getProperty("java.home")) println(" JDK: " + System.getProperty("java.home"))
releaseParams { releaseParams {
tlp.set("darklaf") tlp.set("darklaf")
@ -133,6 +133,18 @@ allprojects {
enabled = false enabled = false
} }
} }
if (!skipAutostyle) {
autostyle {
cpp {
licenseHeader(File("${project.rootDir}/LICENSE").readText())
trimTrailingWhitespace()
endWithNewline()
eclipse {
configFile("${project.rootDir}/darklaf_cpp.eclipseformat.xml")
}
}
}
}
} }
if (!enableGradleMetadata) { if (!enableGradleMetadata) {

0
windows/darklaf_cpp.eclipseformat.xml → darklaf_cpp.eclipseformat.xml

17
windows/build.gradle.kts

@ -1,4 +1,4 @@
import com.github.vlsi.gradle.properties.dsl.props
plugins { plugins {
`jni-library` `jni-library`
@ -39,18 +39,3 @@ library {
) )
} }
} }
val skipAutostyle by props()
if (!skipAutostyle) {
autostyle {
cpp {
licenseHeader(File("${project.rootDir}/LICENSE").readText())
trimTrailingWhitespace()
endWithNewline()
eclipse {
configFile("darklaf_cpp.eclipseformat.xml")
}
}
}
}

Loading…
Cancel
Save