Skip to content

Commit

Permalink
Stop autogenerating PantheonInfo.java (hyperledger#1899)
Browse files Browse the repository at this point in the history
The version is now read from a manifest file so there's nothing dynamic about the file.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
  • Loading branch information
ajsutton authored Sep 3, 2019
1 parent 235c72a commit 0a37856
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 171 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ allprojects {
exclude '**/generalstate/GeneralStateReferenceTest*.java'
exclude '**/generalstate/GeneralStateRegressionReferenceTest*.java'
exclude '**/blockchain/BlockchainReferenceTest*.java'
exclude '**/pantheon/PantheonInfo.java'
exclude '**/.gradle/**'
}
removeUnusedImports()
Expand Down
157 changes: 0 additions & 157 deletions buildSrc/src/main/groovy/ProjectPropertiesFile.groovy

This file was deleted.

8 changes: 0 additions & 8 deletions pantheon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ dependencies {
testImplementation 'org.apache.commons:commons-text'
}

task writeInfoFile(type: ProjectPropertiesFile) {
destPackage = "tech.pegasys.pantheon"
addString("clientIdentity", rootProject.name)
addVersion("version", "clientIdentity")
}

compileJava.dependsOn(writeInfoFile)

task testJar(type: Jar) {
archiveName 'testPlugins.jar'
manifest {
Expand Down
17 changes: 12 additions & 5 deletions pantheon/src/main/java/tech/pegasys/pantheon/PantheonInfo.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
/*
* Copyright 2019 ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package tech.pegasys.pantheon;

import tech.pegasys.pantheon.util.PlatformDetector;

// This file is generated via a gradle task and should not be edited directly.
public final class PantheonInfo {
private static final String CLIENT_IDENTITY = "pantheon";
private static final String VERSION =
Expand All @@ -16,10 +27,6 @@ public final class PantheonInfo {

private PantheonInfo() {}

public static String clientIdentity() {
return CLIENT_IDENTITY;
}

public static String version() {
return VERSION;
}
Expand Down

0 comments on commit 0a37856

Please sign in to comment.